943,699 Members | Top Members by Rank

Ad:
Nov 10th, 2008
0

Commend -Connection for MySQL with VB6

Expand Post »
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.
Reputation Points: 10
Solved Threads: 4
Light Poster
K.Vanlalliana is offline Offline
44 posts
since Jul 2008
Nov 10th, 2008
0

Re: Commend -Connection for MySQL with VB6

i think the connection string is already available here and the rest VB part is same for all databases.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Solved: VB 4/6 and volume labels
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB 4/6 and volume labels





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC