View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jamie Collins Jamie Collins is offline
external usenet poster
 
Posts: 593
Default DSN-Less Connections

Sauron wrote ...

I've made the changes you
specified but it's still coming back with "Data Source Name not Found
and no default driver specified"...


Phil,
Are you sure you have the driver? It works for me (when I change
MYSERVER to the real server name). Same for the below, which specifies
the OLE DB provider:

ecpsrvConnect = "Provider=SQLOLEDB;" _
& "Data Source=" & ecpsrvname & ";" _
& "Initial Catalog=pubs" & ";" _
& "User Id=" & ecpsrvLogin & ";" _
& "Password=" & ecpsrvPassword & ";"

Jamie.

--