Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.querydao,microsoft.public.excel.programming
|
|||
|
|||
connect to sql
Excel 2000, 2003
I've built an app that connects to sql and does various things. On some machines it works just fine, on other machines it throws an error. The error occurs when I attempt to connect to sql. The error is: Run-time error '-2147467259 (80004005)'; Automation error Unspecified error My connection code is below. Sub Connect() Set rs = New ADODB.Recordset Set cn = New ADODB.Connection sADOConnect = "DSN=MyDSN;UID=MyUID;PWD=MyPwd" With cn .CursorLocation = adUseClient .ConnectionString = sADOConnect .ConnectionTimeout = 180 .CommandTimeout = 180 .Properties("Prompt") = adPromptCompleteRequired .Open End With End Sub Can anyone tell me what is causing this error, and how I can get around it? Thanks, Andre |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Connect PC to UNIX via TCP/IP | Links and Linking in Excel | |||
Excel cannot connect to web | Excel Discussion (Misc queries) | |||
connect to MS SQL | Excel Programming | |||
connect to an oracle db | Excel Programming | |||
SQL Connect | Excel Programming |