List:General Discussion« Previous MessageNext Message »
From:Dennis Salguero Date:July 24 2001 4:31am
Subject:Re: Direct access to a mySQL DB via Visual Basic
View as plain text  
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" <stephen.sherlock@stripped>
To: <mysql@stripped>
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.


Thread
Direct access to a mySQL DB via Visual BasicStephen Sherlock24 Jul
  • Re: Direct access to a mySQL DB via Visual BasicDennis Salguero24 Jul
  • Re: Direct access to a mySQL DB via Visual BasicEric Grau26 Jul
    • conversionGlyndower27 Jul
Re: Direct access to a mySQL DB via Visual BasicStephen Sherlock24 Jul