hello all,
I really need help on this. can't figure out the problem.
I am developing an app which talks to SQL Server and MySQL database.
Here's the code which works well with SQL server but fails with MySQL:
Private sub Populate1()
Dim stri as string
dim oConn as new ADODB.Connection
Dim rs As New ADODB.Recordset
sTri = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=; DATABASE=NEWSAI; UID=;PWD=; PORT="
oConn.ConnectionString = sTri
oConn.Open
rs.open "Select * from test",oconn,2,3
rs.fields("Test23".value="MyValue"
rs.update
Set rs = Nothing
Set oConn = Nothing
end sub
When i run the above code against MySQL i get the following error:
"Multiple step ole db operation generated errors. check each ole db status value, if available. No work done."
Please note that the field size for test23 is 255.
And also i don't get the above error when i run the same code against SQL Server
BUT, the following code WORKS with MySQL.
Private sub Populate2()
Dim stri as string
dim oConn as new ADODB.Connection
dim sQry as string
sTri = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=; DATABASE=NEWSAI; UID=;PWD=; PORT="
oConn.ConnectionString = sTri
oConn.Open
sQry = " Insert into test (test23) values ('MyValue')"
oConn.Execute sQry
Set oConn = Nothing
end sub
I need to use the proceedure listed in populate1, since the code has been written that way and we are adding support for MySQL.
Any support would be highly appreciated.
Thanks in Advance.
Murali Bala
I really need help on this. can't figure out the problem.
I am developing an app which talks to SQL Server and MySQL database.
Here's the code which works well with SQL server but fails with MySQL:
Private sub Populate1()
Dim stri as string
dim oConn as new ADODB.Connection
Dim rs As New ADODB.Recordset
sTri = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=; DATABASE=NEWSAI; UID=;PWD=; PORT="
oConn.ConnectionString = sTri
oConn.Open
rs.open "Select * from test",oconn,2,3
rs.fields("Test23".value="MyValue"
rs.update
Set rs = Nothing
Set oConn = Nothing
end sub
When i run the above code against MySQL i get the following error:
"Multiple step ole db operation generated errors. check each ole db status value, if available. No work done."
Please note that the field size for test23 is 255.
And also i don't get the above error when i run the same code against SQL Server
BUT, the following code WORKS with MySQL.
Private sub Populate2()
Dim stri as string
dim oConn as new ADODB.Connection
dim sQry as string
sTri = "DRIVER={MySQL ODBC 3.51 Driver}; SERVER=; DATABASE=NEWSAI; UID=;PWD=; PORT="
oConn.ConnectionString = sTri
oConn.Open
sQry = " Insert into test (test23) values ('MyValue')"
oConn.Execute sQry
Set oConn = Nothing
end sub
I need to use the proceedure listed in populate1, since the code has been written that way and we are adding support for MySQL.
Any support would be highly appreciated.
Thanks in Advance.
Murali Bala