I am working to develope a software package using MS Visual Basic and MySQL, and so I 
want know about connnecting MyODBC through ADO (ActiveX Data Object) of VB. The format 
for ODBC connectivity through ADO is like :::::: ==>
'   ' Open a connection without using a Data Source Name (DSN).
'   Set cnn1 = New ADODB.Connection
'   cnn1.ConnectionString = "driver={SQL 
Server};server=bigsmile;uid=sa;pwd=pwd;database=pubs"
'   cnn1.ConnectionTimeout = 30   
'   cnn1.Open
'   ' Open a connection using a DSN and ODBC tags.
'   Set cnn2 = New ADODB.Connection
'   cnn2.ConnectionString = "DSN=Pubs;UID=sa;PWD=pwd;"
'   cnn2.Open
'   ' Open a connection using a DSN and OLE DB tags.
'   Set cnn3 = New ADODB.Connection
'   cnn3.ConnectionString = "Data Source=Pubs;User ID=sa;Password=pwd;"
'   cnn3.Open
'   ' Open a connection using a DSN and individual
'   ' arguments instead of a connection string.
'   Set cnn4 = New ADODB.Connection
'   cnn4.Open "Pubs", "sa", "pwd" 
'   Display the state of the connections.
'   MsgBox "cnn1 state: " & GetState(cnn1.State) & vbCr & _
'      "cnn2 state: " & GetState(cnn2.State) & vbCr & _
'      "cnn3 state: " & GetState(cnn3.State) & vbCr & _
'      "cnn4 state: " & GetState(cnn4.State)  ' Open a connection using a DSN and ODBC 
tags.
'   cnn4.Close
'   cnn3.Close
'   cnn2.Close
'   cnn1.Close
'   End Sub

(Source MSDN). 
First I'l install the MySQL in a remote NT server and also MyODBC in Client machine. 
Then I'll create a File DSN using MyODBC. Now what Provider name (eg For Oracle 
"MSDAORA") and ConnectString should I give ?

Reply via email to