[Tutor] Python to connect to MySql

Bernard Lebel atyss4si at hotmail.com
Thu Jul 1 11:44:28 EDT 2004


Hello,

I'm wondering if there is any way to connect to a MySql server (and retreive
information) without the need of an ActiveX object. Right this is what I'm
doing, but again I want to get rid of the active objects.

I have found few things on the internet, but some are for Unix servers and
require a C compiler and things like that. Nothing as simple and
straigthforward as an active object.

Any suggestion?
I'm using MySql 4.0.16


Thanks
Bernard



# Current code:
import win32com.client

 # Create database ActiveX object
 oDB = win32com.client.Dispatch( "ADODB.Connection" )

 # Send connection instructions to database
 oDB.ConnectionString = 'driver={MySQL}; server=xxx.xxx.x.x; uid=userid;
pwd=password; database=database'

 oDB.open



More information about the Tutor mailing list