Click here to Skip to main content
15,894,740 members
Home / Discussions / C#
   

C#

 
GeneralRe: Forms in ASP.Net Pin
MoustafaS11-Jul-05 2:18
MoustafaS11-Jul-05 2:18 
GeneralSQL question Pin
Rassul Yunussov10-Jul-05 22:34
Rassul Yunussov10-Jul-05 22:34 
GeneralRe: SQL question Pin
Guffa11-Jul-05 4:51
Guffa11-Jul-05 4:51 
GeneralComponent Control for Windows CE Pin
hung le quoc10-Jul-05 21:29
hung le quoc10-Jul-05 21:29 
GeneralSQL query help Pin
Anonymous10-Jul-05 19:26
Anonymous10-Jul-05 19:26 
GeneralRe: SQL query help Pin
Sheo Narayan10-Jul-05 19:54
Sheo Narayan10-Jul-05 19:54 
GeneralRe: SQL query help Pin
Anonymous10-Jul-05 22:14
Anonymous10-Jul-05 22:14 
GeneralRe: SQL query help Pin
Sheo Narayan10-Jul-05 22:21
Sheo Narayan10-Jul-05 22:21 
what the right process of executing sql in my knowledge is like this.

This is compact
//To update/insert/delete records
stirng Sql = "Update or whatever sql statement"
OleDbCommand dCmd = new OleDbCommand(Sql,conn);
dCmd.ExecuteNonQuery();
dCmd = null;

// for Select statement
stirng Sql = "Update or whatever sql statement"
OleDbCommand dCmd = new OleDbCommand(Sql,conn);
OleDbDataReader dReader = dCmd.ExecuteReader();
DataGrid1.DataSource = dReader;
DataGrid1.DataBind();
dReader.Close();
dCmd = null;

In your case you are using the Sql into the Command object and again assiging the text property to command object to the same sql.

Please try this way, i hope this should work.

Sheo
QuestionAre Enum's best for this?? Pin
rmoen10-Jul-05 17:49
rmoen10-Jul-05 17:49 
AnswerRe: Are Enum's best for this?? Pin
Guffa11-Jul-05 4:54
Guffa11-Jul-05 4:54 
Questionhow to load a non .Net Win32 DLL in .Net emulator Pin
kroller10-Jul-05 16:42
kroller10-Jul-05 16:42 
AnswerRe: how to load a non .Net Win32 DLL in .Net emulator Pin
Alex Korchemniy10-Jul-05 19:11
Alex Korchemniy10-Jul-05 19:11 
GeneralRe: how to load a non .Net Win32 DLL in .Net emulator Pin
kroller10-Jul-05 19:17
kroller10-Jul-05 19:17 
GeneralReading the contents of a txt/CSV file into an array Pin
TheBlindWatchmaker10-Jul-05 16:15
TheBlindWatchmaker10-Jul-05 16:15 
GeneralRe: Reading the contents of a txt/CSV file into an array Pin
Weiye Chen10-Jul-05 16:44
Weiye Chen10-Jul-05 16:44 
GeneralRe: Reading the contents of a txt/CSV file into an array Pin
Alomgir Miah11-Jul-05 8:33
Alomgir Miah11-Jul-05 8:33 
GeneralAquaButton - A very nice Button control Pin
Nicvan_us10-Jul-05 16:09
Nicvan_us10-Jul-05 16:09 
GeneralRe: AquaButton - A very nice Button control Pin
Alex Korchemniy10-Jul-05 19:08
Alex Korchemniy10-Jul-05 19:08 
GeneralRe: AquaButton - A very nice Button control Pin
User 209307310-Jul-05 19:29
User 209307310-Jul-05 19:29 
Generalmy mp3 alarm clock program Pin
marazm110-Jul-05 14:55
marazm110-Jul-05 14:55 
GeneralRe: my mp3 alarm clock program Pin
Yulianto.10-Jul-05 21:48
Yulianto.10-Jul-05 21:48 
GeneralMass Coding Pin
Expert Coming10-Jul-05 13:45
Expert Coming10-Jul-05 13:45 
GeneralRe: Mass Coding Pin
Guffa10-Jul-05 13:53
Guffa10-Jul-05 13:53 
GeneralRe: Mass Coding Pin
Expert Coming10-Jul-05 13:58
Expert Coming10-Jul-05 13:58 
GeneralRe: Mass Coding Pin
Guffa11-Jul-05 0:44
Guffa11-Jul-05 0:44 

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.