ODBC data access to MS Access DB from a service

Mile

New member
Joined
Jan 17, 2005
Messages
1
Programming Experience
10+
Hi,

I have written a Windows service (running as LocalSystem) application in VB.NET that uses a VB6 COM object to do data access via ODBC. Now, this all works fine when my DSN references an SQL Server database but when I change to use an Access database I get the following error when I try to connect:

[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

I connect in my COM object by simply calling:

Call oConnection.Open(sDSN, sUserID, password)

It seems to work better when I change the service to run as me, but I would prefer to be able to keep it set to LocalSystem so it's the same as when connecting to SQL Server.

Any ideas?

Thanks
 
try using adodb.connection

add the adodb as reference..

then declare it as you did the sql connection... its basically the same..
 
Back
Top