Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jriis
Starting Member
1 Post |
Posted - 2002-10-18 : 05:41:43
|
| HiI am looking for an easy way to connect from Visual Basic 6.0 to a MySQL database.Anyone got a simple way to do this or is it more complex.RegardsJan Riis Soerensen |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2002-10-18 : 07:50:42
|
| These are connection strings for both ODBC or OLEDB (recommended). We have a class module to easily specify our connection anywhere in code.'**********************************************************************************************' ODBC CONNECTION STRING'**********************************************************************************************'cnn1.ConnectionString = "Data Source=Sql_Tos;user ID=" & Me.txtUserName & ";password=" & Me.txtPassword 'LIVE SYS CONNECTIONcnn1.ConnectionString = "Data Source=Sql_Tos_dev_uk_2;user ID=" & Me.txtUserName & ";password=" & Me.txtPassword 'TEST SYS CONNECTIONcnn1.Open'**********************************************************************************************'**********************************************************************************************'**********************************************************************************************' OLEDB CONNECTION STRING'**********************************************************************************************'***** OLE DB connection string test - works but problems with insert SPs with returning of Auto ID's'cnn1.ConnectionTimeout = 15'cnn1.Provider = "SQLOLEDB"'''LIVE SYS'cnn1.Open "Data Source=Tempest_SQL1;Initial Catalog=Sql_Tos;User ID=" & Me.txtUserName & ";password=" & Me.txtPassword'''TEST SYS'cnn1.Open "Data Source=Dev_UK_2;Initial Catalog=Sql_Tos;User ID=" & Me.txtUserName & ";password=" & Me.txtPassword'**********************************************************************************************'**********************************************************************************************===========Paul |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-10-18 : 07:51:08
|
| HiI would guess using ADO, you might want to check MSDN for some info on that. Or, maybe look at a MySQL site. We mainly deal with SQL Server here.Damian |
 |
|
|
|
|
|