You could try the next way (only change for the real names)
Also, it could be helpful if you visit ---> http://www.connectionstrings.com/Code:' Dim MyConStr AS String Dim MySQL AS ADODB.Connection ' ' MyConStr = "Provider=SQLOLEDB.1;" & _ "UID=xxx;" & _ "PWD=yyyyyy;" & _ "Persist Security Info=False;" & _ "Initial Catalog=DBNAME;" & _ "Data Source=SERVERNAME" Set MySQL = New ADODB.Connection MySQL.CursorLocation = adUseClient MySQL.ConnectionString = MyConStr MySQL.Open MySQL.CommandTimeout = 0




Reply With Quote