Hi everybody,
How to write the connection string and sql queries in the XML.
I use the mysql database.
I use the following connection string and query using asp.net with C#.
Connection String:
con=new OdbcConnection( "Driver={My SQL ODBC 5.1 Driver};Server= VBNET4;Port=330 6; Database=netmus k; User=root; Password=harsha ;Option=3; Min Pool Size=5; Max Pool Size=60; Connect Timeout=2;");
con.Open();
Query:
try
{
con.Close();
con.Open();
cmd = new OdbcCommand("Se lect firstname,usert oolbarid,pass_w ord from user_table where firstname='" + txt_username.Te xt + "' and pass_word='" + txt_password.Te xt + "'", con);
dr = cmd.ExecuteRead er();
while (dr.Read())
{
String getuname = dr.GetString(0) ;
String getloginid = dr.GetString(1) ;
String getpword = dr.GetString(2) ;
}
dr.Close();
Please help me
Thanks in Advance.
J. Mohan.
How to write the connection string and sql queries in the XML.
I use the mysql database.
I use the following connection string and query using asp.net with C#.
Connection String:
con=new OdbcConnection( "Driver={My SQL ODBC 5.1 Driver};Server= VBNET4;Port=330 6; Database=netmus k; User=root; Password=harsha ;Option=3; Min Pool Size=5; Max Pool Size=60; Connect Timeout=2;");
con.Open();
Query:
try
{
con.Close();
con.Open();
cmd = new OdbcCommand("Se lect firstname,usert oolbarid,pass_w ord from user_table where firstname='" + txt_username.Te xt + "' and pass_word='" + txt_password.Te xt + "'", con);
dr = cmd.ExecuteRead er();
while (dr.Read())
{
String getuname = dr.GetString(0) ;
String getloginid = dr.GetString(1) ;
String getpword = dr.GetString(2) ;
}
dr.Close();
Please help me
Thanks in Advance.
J. Mohan.
Comment