ODBC DSN query issue

E

EricStumpf

I've researched this to death, and many sources point to the same answer, yet
I keep getting the DSN prompt box when I try to run a query with the user ID
& pw imbedded in the query. (I'm trying to get passed needing to manually
enter a password when I run a Scheduled Task. - My system is set up that I do
not have the option of saving a password.)

This is what I have in the Source Connect Str
ODBC;DSN=edwprdi0;UID=xxx;PWD=xxx;

When I run as a pass-thru, I just get the prompt asking for a DSN

SELECT ARMUV006.LEAD_CAR_INIT, ARMUV006.LEAD_CAR_NBR
FROM ARMUV006 IN '' [ODBC;DSN=edwprdi0;UID=xxx;PWD=xxx;]
WHERE (((ARMUV006.LEAD_CAR_INIT)="SP") AND ((ARMUV006.LEAD_CAR_NBR)=999999));

If I leave the orignial table name ARMDVP00_ARMUV006 in the SQL, an error is
returned stating the table or query could not be found.

SELECT ARMUV006.LEAD_CAR_INIT, ARMUV006.LEAD_CAR_NBR
FROM ARMDVP00_ARMUV006 AS ARMUV006 IN ''
[ODBC;DSN=edwprdi0;UID=OADM353;PWD=ANGELJ;]
WHERE (((ARMUV006.LEAD_CAR_INIT)="SP") AND ((ARMUV006.LEAD_CAR_NBR)=999999));
 
S

Sylvain Lafontaine

The first thing to check would be to know if you have created a System DSN
instead of an User DSN. In the past, I had personally many problems (it
didn't work at all) when trying to use a System DSN instead of an User DSN
but I've also seen other people saying that they didn't have any problem
using a System DSN.

Second, your passthrough query doesn't look like a passthrough query to me:
T-SQL does'nt understand the operator IN against an ODBC connection string.
Is ARMUV006 the name of a local linked table?

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Blog/web site: http://coding-paparazzi.sylvainlafontaine.com
Independent consultant and remote programming for Access and SQL-Server
(French)


EricStumpf said:
I've researched this to death, and many sources point to the same answer,
yet
I keep getting the DSN prompt box when I try to run a query with the user
ID
& pw imbedded in the query. (I'm trying to get passed needing to manually
enter a password when I run a Scheduled Task. - My system is set up that I
do
not have the option of saving a password.)

This is what I have in the Source Connect Str
ODBC;DSN=edwprdi0;UID=xxx;PWD=xxx;

When I run as a pass-thru, I just get the prompt asking for a DSN

SELECT ARMUV006.LEAD_CAR_INIT, ARMUV006.LEAD_CAR_NBR
FROM ARMUV006 IN '' [ODBC;DSN=edwprdi0;UID=xxx;PWD=xxx;]
WHERE (((ARMUV006.LEAD_CAR_INIT)="SP") AND
((ARMUV006.LEAD_CAR_NBR)=999999));

If I leave the orignial table name ARMDVP00_ARMUV006 in the SQL, an error
is
returned stating the table or query could not be found.

SELECT ARMUV006.LEAD_CAR_INIT, ARMUV006.LEAD_CAR_NBR
FROM ARMDVP00_ARMUV006 AS ARMUV006 IN ''
[ODBC;DSN=edwprdi0;UID=OADM353;PWD=ANGELJ;]
WHERE (((ARMUV006.LEAD_CAR_INIT)="SP") AND
((ARMUV006.LEAD_CAR_NBR)=999999));

===>> You forgot to remove the real PWD on this one. <<===
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top