Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
QuestionSQL connection execute what? Pin
laziale29-Jun-08 23:13
laziale29-Jun-08 23:13 
AnswerRe: SQL connection execute what? Pin
Christian Graus29-Jun-08 23:22
protectorChristian Graus29-Jun-08 23:22 
GeneralRe: SQL connection execute what? Pin
laziale29-Jun-08 23:28
laziale29-Jun-08 23:28 
GeneralRe: SQL connection execute what? Pin
Christian Graus29-Jun-08 23:36
protectorChristian Graus29-Jun-08 23:36 
AnswerRe: SQL connection execute what? Pin
Mbah Dhaim29-Jun-08 23:27
Mbah Dhaim29-Jun-08 23:27 
GeneralRe: SQL connection execute what? Pin
Colin Angus Mackay29-Jun-08 23:31
Colin Angus Mackay29-Jun-08 23:31 
JokeRe: SQL connection execute what? Pin
Mbah Dhaim29-Jun-08 23:37
Mbah Dhaim29-Jun-08 23:37 
GeneralRe: SQL connection execute what? Pin
laziale29-Jun-08 23:34
laziale29-Jun-08 23:34 
the same query, like I wroted here, I am using with MSSMS, and it works fine and is updating the table, and when I am using here with C#, it doesn't. I get rid of the DataAdapters, I put them because I thought is similar like for SELECT query, now I remove them. The connection is open before the query, I am having one more query for selecting the data, and after that I am trying to update the data. According to your last post, now my code looks like this:


//the connection is already open
con.Open();

string updateQuery = "UPDATE Credentials SET Username = '" + txtUser.Text + "', Password = '" + txtPass.Text + "', Address = '" + txtAddress.Text + "' WHERE Username='" + user + "',AND Password='" + pass + "', AND Address='" + address + "'";
SqlCommand updateCom = con.CreateCommand();
updateCom.CommandText = updateQuery;
comm.ExecuteNonQuery();
con.Close();


thx guys...
GeneralRe: SQL connection execute what? Pin
Christian Graus29-Jun-08 23:39
protectorChristian Graus29-Jun-08 23:39 
AnswerRe: SQL connection execute what? Pin
Colin Angus Mackay29-Jun-08 23:30
Colin Angus Mackay29-Jun-08 23:30 
GeneralRe: SQL connection execute what? Pin
laziale29-Jun-08 23:36
laziale29-Jun-08 23:36 
GeneralRe: SQL connection execute what? Pin
Christian Graus29-Jun-08 23:38
protectorChristian Graus29-Jun-08 23:38 
GeneralRe: SQL connection execute what? Pin
laziale29-Jun-08 23:40
laziale29-Jun-08 23:40 
GeneralRe: SQL connection execute what? Pin
laziale30-Jun-08 0:04
laziale30-Jun-08 0:04 
Questionhow to use calculous to programing three dimensional graphics Pin
chenli051329-Jun-08 23:00
chenli051329-Jun-08 23:00 
AnswerRe: how to use calculous to programing three dimensional graphics Pin
Christian Graus29-Jun-08 23:04
protectorChristian Graus29-Jun-08 23:04 
AnswerRe: how to use calculous to programing three dimensional graphics Pin
leppie29-Jun-08 23:46
leppie29-Jun-08 23:46 
AnswerRe: how to use calculous to programing three dimensional graphics Pin
Alan Balkany30-Jun-08 4:57
Alan Balkany30-Jun-08 4:57 
QuestionNumericUpDown SelectedText property work-around Pin
jozsurf29-Jun-08 22:51
jozsurf29-Jun-08 22:51 
AnswerRe: NumericUpDown SelectedText property work-around Pin
Kjetil Svendsen30-Jun-08 5:27
Kjetil Svendsen30-Jun-08 5:27 
GeneralRe: NumericUpDown SelectedText property work-around Pin
jozsurf30-Jun-08 15:00
jozsurf30-Jun-08 15:00 
QuestionPropertyGrid + SelectedObjects Pin
KBou29-Jun-08 22:47
KBou29-Jun-08 22:47 
QuestionProjectitem unavailable error in my project Pin
Russell Jones29-Jun-08 21:31
Russell Jones29-Jun-08 21:31 
AnswerRe: Projectitem unavailable error in my project Pin
Rye20-Apr-09 6:45
Rye20-Apr-09 6:45 
AnswerRe: Projectitem unavailable error in my project Pin
priscila_monica786-Nov-11 6:00
priscila_monica786-Nov-11 6:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.