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={MySQL ODBC 5.1 Driver};Server=VBNET4;Port=3306; Database=netmusk; 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("Select firstname,usertoolbarid,pass_word from user_table where firstname='" + txt_username.Text + "' and pass_word='" + txt_password.Text + "'", con);
dr = cmd.ExecuteReader();
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.