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!

Trying to access data via DSN connection

Status
Not open for further replies.

thorntong

Programmer
Feb 4, 2009
21
0
0
US
Good Morning All,
I am trying to see if I can make a direct SQL call using an OPENDATASOURCE call to a DSN that has been setup on my SQL 2005 server. And I am having trouble with the syntax using this type of call. I am trying to access the OD_RECEIPTS table within a ODBC System Name of CPSIODBC. This is what I have now:

Code:
SELECT *
FROM OPENDATASOURCE('ODBC','DSN=CPSIODBC;User ID=;Password=').od_receipts

And I getting an 'Invalid object name 'od_receipts' error. Does anyone what the proper syntax that I should be using? It seems to me like I'm missing more in way of the table syntax rather than the ODBC credentials. I just don't know.
Kind Regards,
Glenn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top