Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file dsn dao sybase

Status
Not open for further replies.

richmann

Programmer
Jun 11, 2001
1
DE
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;Sybase 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.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top