If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
ODBC DSN query issue
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)); -- TIA Eric S Union Pacific RR |
#2
|
|||
|
|||
ODBC DSN query issue
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" .(nospamplease) wrote in message ... 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. === -- TIA Eric S Union Pacific RR |
Thread Tools | |
Display Modes | |
|
|