Commend -Connection for MySQL with VB6

Reply

Join Date: Jul 2008
Posts: 44
Reputation: K.Vanlalliana is an unknown quantity at this point 
Solved Threads: 3
K.Vanlalliana K.Vanlalliana is offline Offline
Light Poster

Commend -Connection for MySQL with VB6

 
0
  #1
Nov 10th, 2008
Hi,

If you are interest in using MySQL as your back end database, here is one way to connect:
By using ODBC:

'Declare ADODB variable
Public ConnectData As New ADODB.Connection

Set ConnectData = New ADODB.Connection
ConnectData.Open "DSN=MySQL_ODBC"


If you want to use MySQL ODBC 3.51 Driver , You can write the connection like this:

Set ConnectData = New ADODB.Connection
'ConnectData.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;Database=Databasename;UID=Username;PWD=Password;OPTION=3"

ConnectData.Open


If you want to use MySQL ODBC 5.1 Driver , You can write the connection like this:

ConnectData.ConnectionString = "DRIVER={MySQL ODBC 5.1 Driver};SERVER=localhost;Database=Databasename;UID=Username;PWD=Password;OPTION=3"
ConnectData.Open


I hope this will be helpful for New learner. If there is another new easy and simpler way, give your sugestion here.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,094
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 128
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: Commend -Connection for MySQL with VB6

 
0
  #2
Nov 10th, 2008
i think the connection string is already available here and the rest VB part is same for all databases.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC