View Single Post
 
Old 11-14-2012, 04:25 AM
tinfanide tinfanide is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default ADODB.Connection.Open Provider?

Code:
Sub test()

Dim cn As New ADODB.Connection
Dim rs As New ADODB.Recordset

Dim ConStr As String
ConStr = "Provider=sql100.xtreemhost.com;Server=sql100.xtreemhost.com;Database=myDatabase;Uid=xth_9595110;Pwd=myPassword"

Dim sql As String
sql = "select * from myTable"

''' Application-defined or Object-defined error
cn.Open ConStr

rs.Open sql, cn

MsgBox rs("Headings")

rs.Close
cn.Execute sql
cn.Close

End Sub
In MySQL scripting, I only do this and it can work:
Code:
$connect = mysql_connect("sql100.xtreemhost.com","xth_9595110","myPassword") or die(mysql_error());

mysql_select_db("myTable",$connect);
I wonder if my connection string is wrong.
If I'm using xtreemhost SQL server
What is the provider? What is the server?
Reply With Quote