Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO/VB with MySQL

Status
Not open for further replies.

chelseatech

Instructor
Aug 25, 2001
1,812
NZ
I've got a VB application running on Windows and a MySQL DB on a linux box. I connect to MySQL using ODBC, and have my Crystal Reports working nicely from the DB using ODBC.

I can create an ADO connection to the linux DB, and execute SQL against it, to add and delete records, modify columns, etc.

I want to use an ADO recordset and then have some VB code to modify fields as I process the recordset. As soon as I try to connect to the ADO recordset, with
rsOut.Open sTable, adoOut, adOpenKeyset, adLockOptimistic

I get an error that the connection type is not supported. I've tried the various ODBC connection options suggested in other threads, but with no luck.

Has anyone got this working?
Editor and Publisher of Crystal Clear
 
I'm new to the ADO/VB, but I have a similar setup working fine. Here's a sample that may help:

<%
set conn=Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.Open &quot;MikeShop&quot;

set rs=Server.CreateObject(&quot;ADODB.recordset&quot;)
rs.open &quot;select * from pet&quot;,conn

do until rs.EOF
for each x in rs.fields
response.write(x.name)
response.write(&quot; = &quot;)
response.write(x.value & &quot;<br />&quot;)
next
response.write(&quot;<p> </p>&quot;)
rs.MoveNext
loop

rs.close
conn.close
%>

Hope this helps some!
 
Thanks,

I'm doing much the same in VB, rather than ASP, but glad to hear you've got it working, so I know that much is possible.

So my problem must be in my ODBC settings. Can you tell me what you've got there? And what version of MyODBC did you use?

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top