Changeset 110
- Timestamp:
- 03/03/07 12:10:20 (2 years ago)
- Files:
-
- dmp/trunk/BadClient/Form1.cs (modified) (3 diffs)
- dmp/trunk/daap-sharp/BridgeDatabase.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
dmp/trunk/BadClient/Form1.cs
r97 r110 20 20 21 21 private void button1_Click(object sender, EventArgs e) { 22 try23 {22 //try 23 //{ 24 24 if (myBridge.AddServerConnection(txtHost.Text, ushort.Parse(txtPort.Text)) > 0) 25 25 { … … 37 37 lblStatus.Text = "Status: It didn't connect..."; 38 38 } 39 }39 /*} 40 40 catch (Exception exception) 41 41 { … … 43 43 MessageBox.Show("Exception occurred in "+ 44 44 exception.Source+" (check output for backtrace): " + exception.Message); 45 } 45 }*/ 46 46 } 47 47 dmp/trunk/daap-sharp/BridgeDatabase.cs
r104 r110 128 128 logFile.WriteLine("adding " + theClient.Address + " to libraries"); logFile.Flush(); 129 129 IDbCommand command = this.databaseConnection.CreateCommand(); 130 command.CommandText = @"insert into libraries 131 ( address, port, name, username, password ) values ( 132 '" + theClient.Address + @"', 133 '" + theClient.Port + @"', 134 '" + theClient.Name + @"', 135 '" + theClient.Username + @"', 136 '" + theClient.Password + @"'); 130 command.CommandText = @"INSERT INTO libraries 131 (name, username, password ) values (?, ?, ?); 137 132 SELECT last_insert_rowid();"; 133 IDataParameter clientName = command.CreateParameter(); 134 command.Parameters.Add(clientName); 135 IDataParameter clientUsername = command.CreateParameter(); 136 command.Parameters.Add(clientUsername); 137 IDataParameter clientPassword = command.CreateParameter(); 138 command.Parameters.Add(clientPassword); 139 140 clientName.Value = theClient.Name; 141 clientUsername.Value = theClient.Username; 142 clientPassword.Value = theClient.Password; 138 143 139 144 //IDbCommand command2 = this.databaseConnection.CreateCommand();
