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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"'(unknown)' is not a valid path" but DSN is an SQL Server!

Status
Not open for further replies.

jadn

Programmer
Oct 28, 2005
23
US
Hi,
I wrote some code which is installed and working on the WXP dev. station and several W2K workstations. In the code an ODBC connection is made to DSN=RemoteDB;UID=;PWD=; (this through ADODB)

"RemoteDB" is a System datasource (to an SQL Server) and the test panel works. However, on one Win2K machine when opening the ODBC connection, the open method throws the error:

"Exception occurred in Microsoft OLE DB Provider for ODBC Drivers, [Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path..."

All the articles I can find imply this must be because a bad path to an .mdb has been supplied - BUT the DSN refers to an SQL Server!?

I've installed MDAC SP1 on the problem machine (no joy) and will do the same on my dev. station, recompile, and try again.

Any ideas would be appreciated.

Thanks, Cheers.
 
I assume that you've removed and recreated the DSN manually?

Does the DSN work if you use Excel and try to connect to the SQL Server?

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Hi MrDenny,
Thanks for your reply. While replying-back to you, I ran a few tests to be accurate. Well, to make a long story short, I found the problem. A previous incarnation of my program had left a DSN with the same name under USER DSN. It was only visible when logged-in as that user. Apparently the USER DSN takes precedence over SYSTEM DSN.

Thanks again!
 
Yeah, I can see that. In Windows User Settings typically override system settings.

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top