Jump to content

VBA SQL server name?


tinfanide

Recommended Posts

Dim oConn As ADODB.ConnectionPrivate Sub ConnectDB()Set oConn = New ADODB.ConnectionDim str As Stringstr = "DRIVER={MySQL ODBC 5.2.2 Driver};" & _					    "SERVER={???};" & _					    "PORT=3306" & _					    "DATABASE=xth_9595110_MyNotes;" & _					    "UID=xth_9595110;" & _					    "PWD=myPassword;" & _					    "Option=3"oConn.Open strEnd Sub Private Sub InsertData()Dim rs As ADODB.RecordsetSet rs = New ADODB.RecordsetConnectDBsql = "SELECT * FROM ComputingNotesTable"rs.Open sql, oConn, adOpenDynamic, adLockOptimisticDo Until rs.EOF    Range("A1").Select    ActiveCell = rs.Fields("Headings")    rs.MoveNextLooprs.CloseoConn.CloseSet oConn = NothingSet rs = NothingEnd Sub

I would like to ask what I should fill in in the server name if I am connecting to Xtreemhost MySQL databases. It returns run-time errors.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...