Dear All,
I have been trying this for a few days now but still not able to find a proper solution to this problem.
I am trying to connect to MYSQL database through VB.NET 2005 bt i am facing a problem. The Code I am using is as follows :-
*************** *************** *************** **********
Dim mySQLConnString As String
Dim mySQLConn As SqlClient.SqlCo nnection
Dim dbReader As SqlClient.SqlDa taReader
Dim dbCmd As SqlClient.SqlCo mmand = New SqlClient.SqlCo mmand( _
"SELECT name, rollno,address FROM data where rollno=547")
mySQLConnString = "Provider=MSDAS QL;DRIVER={MySQ L ODBC 3.51 Driver};Server= localhost;Datab ase=vbtesting;U ser=test;Passwo rd=test;"
mySQLConn = New SqlClient.SqlCo nnection(mySQLC onnString)
mySQLConn.Open( )
dbCmd.Connectio n = mySQLConn
dbReader = dbCmd.ExecuteRe ader(CommandBeh avior.SingleRes ult)
Do While dbReader.Read()
TextBox1.Text = dbReader.GetStr ing(0)
TextBox2.Text = dbReader.GetStr ing(1)
TextBox3.Text = dbReader.GetStr ing(2)
Loop
*************** *************** *************
but the error i am getting is (KEYWORD NOT SUPPORTED "PROVIDER") and if I remove Provider then the same error popsup for DRIVER.
Please Help. thanx in advance.
Thanks & Regards
Nrip
I have been trying this for a few days now but still not able to find a proper solution to this problem.
I am trying to connect to MYSQL database through VB.NET 2005 bt i am facing a problem. The Code I am using is as follows :-
*************** *************** *************** **********
Dim mySQLConnString As String
Dim mySQLConn As SqlClient.SqlCo nnection
Dim dbReader As SqlClient.SqlDa taReader
Dim dbCmd As SqlClient.SqlCo mmand = New SqlClient.SqlCo mmand( _
"SELECT name, rollno,address FROM data where rollno=547")
mySQLConnString = "Provider=MSDAS QL;DRIVER={MySQ L ODBC 3.51 Driver};Server= localhost;Datab ase=vbtesting;U ser=test;Passwo rd=test;"
mySQLConn = New SqlClient.SqlCo nnection(mySQLC onnString)
mySQLConn.Open( )
dbCmd.Connectio n = mySQLConn
dbReader = dbCmd.ExecuteRe ader(CommandBeh avior.SingleRes ult)
Do While dbReader.Read()
TextBox1.Text = dbReader.GetStr ing(0)
TextBox2.Text = dbReader.GetStr ing(1)
TextBox3.Text = dbReader.GetStr ing(2)
Loop
*************** *************** *************
but the error i am getting is (KEYWORD NOT SUPPORTED "PROVIDER") and if I remove Provider then the same error popsup for DRIVER.
Please Help. thanx in advance.
Thanks & Regards
Nrip