You COULD use the ADO data control, but I wouldn't recommend it. There are
still some ADO methods and objects that are not fully supported and you will
most likely generate some strange errors. It may be a pain to do it, but
you'll be better off doing it the "old-fashioned" way with your own
connection object and recordset functions.

As for your second issue, you can use a DSN-less connection that should give
you slightly better performance. Take a look at the code shown here:

<%
Function Get_Connection()

Set objConn = Server.CreateObject("ADODB.Connection")

objConn.Open "uid=root;pwd=;driver={MySQL};server=localhost;database=db"

If Err.Number = 0 Then
    Get_Connection = True
Else
    Get_Connection = False
End If

End Function
%>

Of course, realize that this is ASP code, but it certainly provides the
framework for a VB connection.

If anyone is interested, I am willing to send out the VB files I use to
connect to MySQL databases - just send me an e-mail.

Good Luck,

Dennis
**********************************************
Beridney Computer Services
http://www.beridney.com

----- Original Message -----
From: "Stephen Sherlock" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 9:12 PM
Subject: Direct access to a mySQL DB via Visual Basic


I've been told that it's possible to connect directly to a mySQL DataBase
with Visual Basic, by using the {mySQL} provider within the ADO Data
Control, however, none of the providers on the list include mySQL at all,
and I was wondering if anyone could shed some light on this.

I want to connect to the DB directly rather than through ODBC because the
final project I'm working on will include some hefty processor and memory
usage as it is, and the last thing I need is more resources being taken up
by ODBC.



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to