Click here to Skip to main content
15,915,600 members
Home / Discussions / C#
   

C#

 
GeneralRe: Sorting Algorithm Pin
leppie29-Aug-04 22:21
leppie29-Aug-04 22:21 
GeneralRe: Sorting Algorithm Pin
Marc Clifton30-Aug-04 2:51
mvaMarc Clifton30-Aug-04 2:51 
GeneralDisabling Some items in ComboBox Pin
Osrald29-Aug-04 19:09
Osrald29-Aug-04 19:09 
GeneralRe: Disabling Some items in ComboBox Pin
sreejith ss nair29-Aug-04 22:34
sreejith ss nair29-Aug-04 22:34 
GeneralRe: Disabling Some items in ComboBox Pin
Osrald30-Aug-04 15:12
Osrald30-Aug-04 15:12 
GeneralRe: Disabling Some items in ComboBox Pin
sreejith ss nair30-Aug-04 17:49
sreejith ss nair30-Aug-04 17:49 
GeneralUnable to run two Mysql commands through ODBC in C# Pin
Admiral Ackbar29-Aug-04 14:35
Admiral Ackbar29-Aug-04 14:35 
GeneralRe: Unable to run two Mysql commands through ODBC in C# Pin
Charlie Williams29-Aug-04 16:40
Charlie Williams29-Aug-04 16:40 
From MSDN: "While the OdbcDataReader is in use, the associated OdbcConnection is busy serving the OdbcDataReader, and no other operations can be performed on the OdbcConnection other than closing it. This is the case until the Close method of the OdbcDataReader is called."

You are trying to reuse the connection before closing the first OdbcDataReader. Finish with the first reader before executing the second one or give the second one its own connection.

On a side note, concatenating strings to come up with your sql command is asking for trouble. You'll save yourself headaches down the road if you switch to paramterized queries. If your DB doesn't support named parameters, you'll have to add them in the exact order they appear in the command. For example:
// The ? is a placeholder for the parameter
OdbcCommand nameTableShow = new OdbcCommand("select find_in_set(?, usr_name) from user", MyConnection);
nameTableShow.Parameters.Add("login", this.LoginBox.Text.Trim());


Charlie

if(!curlies){ return; }
GeneralRe: Unable to run two Mysql commands through ODBC in C# Pin
Admiral Ackbar29-Aug-04 17:12
Admiral Ackbar29-Aug-04 17:12 
QuestionCryptography, different decrypt values, why? Pin
Sneha Joseph29-Aug-04 12:22
Sneha Joseph29-Aug-04 12:22 
AnswerRe: Cryptography, different decrypt values, why? Pin
Heath Stewart29-Aug-04 13:14
protectorHeath Stewart29-Aug-04 13:14 
QuestionC# Inherit Base Class Needs Variable - How? Pin
Cyric7429-Aug-04 11:15
Cyric7429-Aug-04 11:15 
AnswerRe: C# Inherit Base Class Needs Variable - How? Pin
S Sansanwal29-Aug-04 11:33
S Sansanwal29-Aug-04 11:33 
GeneralRe: C# Inherit Base Class Needs Variable - How? Pin
Cyric7429-Aug-04 11:39
Cyric7429-Aug-04 11:39 
GeneralRandom number Pin
ImanMahmoud29-Aug-04 10:38
ImanMahmoud29-Aug-04 10:38 
GeneralRe: Random number Pin
Cyric7429-Aug-04 11:33
Cyric7429-Aug-04 11:33 
GeneralRe: Random number Pin
S Sansanwal29-Aug-04 11:33
S Sansanwal29-Aug-04 11:33 
GeneralRe: Random number Pin
ImanMahmoud29-Aug-04 12:27
ImanMahmoud29-Aug-04 12:27 
GeneralRe: Random number Pin
leppie29-Aug-04 12:35
leppie29-Aug-04 12:35 
GeneralGetting the Maximum Possible Size of a control Pin
Waleed Eissa29-Aug-04 7:04
Waleed Eissa29-Aug-04 7:04 
GeneralListBox UserControl Collections Pin
Groovydaz29-Aug-04 3:26
Groovydaz29-Aug-04 3:26 
GeneralRe: ListBox UserControl Collections Pin
Heath Stewart29-Aug-04 11:51
protectorHeath Stewart29-Aug-04 11:51 
Questionhow do my program know that both buttons are down Pin
Umair Ahmad khan28-Aug-04 23:09
Umair Ahmad khan28-Aug-04 23:09 
AnswerRe: how do my program know that both buttons are down Pin
mav.northwind28-Aug-04 23:42
mav.northwind28-Aug-04 23:42 
GeneralRe: how do my program know that both buttons are down Pin
Umair Ahmad khan29-Aug-04 0:57
Umair Ahmad khan29-Aug-04 0:57 

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.