Im having problems connecting via dao to a file dsn (which connects to a sybase dsn). Im writing it in 2003 excel vba. I cannot use a system or user dsn as I don’t have access to the registry (XP system constraint). Im using a Sybase ASE ODBC driver. The file dsn connects OK, so I know it’s the dao code that’s the issue.

Ive used the following code with the error messages.

Attempt 1)
Error: disk or network error

Dim db as database
Set db = OpenDatabase(“ODBC;DSN=dsnname;Sybase tablename;UID=userid;PWD=password”)

Attempt 2)
Error: disk or network error

Set db = OpenDatabase(“ODBC;FILEDSN=fullpath\dsnname.dsn;Sy base tablename;UID=userid;PWD=password”)

If the dsn itself works what am is missing?

Im going bald with this. Please give a complete answer as possible.
Please help as this is an urgent problem. Many thanks