-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: bhavinonlydnet
Message 6 in Discussion

Hi,

Thank you for reply but i am sure my code is correct and nothing is changed.

i am sending you my test code.

i am using mysql connector 1.0.4 library to connect with my sql database.

Here is my demo code....

using MySql.Data.MySqlClient;
using MySql.Data;

string connstr = "SERVER=MYSQLSERVERNM;DATABASE=MYSQLDB;UID=abcdef;PWD=123456;";

MySqlConnection conn = new MySqlConnection(connstr);

try
{
      conn.Open(); 

      string sqlstr = "select count(*) from tb_companymaster where UserName='" 
+ m_userName + "' AND Password='" + m_userPassword + "' AND MemberStatus=1";

      MySqlCommand cmd= new MySqlCommand(sqlstr,conn); 

     if( cmd.ExecuteScalar().ToString() == "1")
     {
           iflag = 1;
     }
     else
     {
          iflag = 0;
     }
}
catch(Exception ex)
{
string st1= ex.Message.ToString();
iflag = 0;
}
finally
{
conn.Close();
}
.
.
.

As i told you my application was working from 15 - 20 days on same code and now 
it is prompting this message.

I am able to connect mysql and things working fine but while i m trying to 
connect through application it prompt error and conn.open() throws exception.

Do you have idea that library i am using may have some problem.

Please guide me.

Thank you.

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to