J
Jim
Hi,
Is there no way I can make this work?
if(!Globals.workonline)
{
mysql dbconn = new mysql();
}
else
{
mysqlonline dbconn = new mysqlonline();
}
// Check if the user exists
OdbcCommand rsc = new OdbcCommand("select password from login where
username='" + txtUsername.Text + "'", dbconn.conn);
It keeps complaining on the OdbcCommand line that dbconn does not exist.
Basically, I need to initialize the right DB connection based on user
input. I'm using the 1.0 .NET framework.
Any help would be much appreciated, I have a deadline and am a newbie to C#.
Thanks,
Jim
Is there no way I can make this work?
if(!Globals.workonline)
{
mysql dbconn = new mysql();
}
else
{
mysqlonline dbconn = new mysqlonline();
}
// Check if the user exists
OdbcCommand rsc = new OdbcCommand("select password from login where
username='" + txtUsername.Text + "'", dbconn.conn);
It keeps complaining on the OdbcCommand line that dbconn does not exist.
Basically, I need to initialize the right DB connection based on user
input. I'm using the 1.0 .NET framework.
Any help would be much appreciated, I have a deadline and am a newbie to C#.
Thanks,
Jim