I'm trying to make a dynamic odbc connection from my access program to a mysql database on my web site.
When I execute the function I get a runtime error -2147467259 (80004005)
[Microsoft][ODBC Driver Manager] Data source name too long
Here's what I've pieced together so far :
Public Function PostOpenSRsToWebsite()
Dim oConn As ADODB.Connection
Set oConn = New ADODB.Connection
oConn.Open "DSN=odbc2mysql, UID=nnnn, PWD=nnnn3!, DATABASE=xxxx"
DoCmd.RunSQL ("DELETE * FROM tblServiceDisplay")
On Error GoTo ErrMsg
DoCmd.OpenQuery "wbqryOpenSRs2", , acAdd
MsgBox "Connection to CARE website has been lost! Inform CARE Administrator."
I'm really new at this and would appreciate any help.