A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

ODBC DSN query issue



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2010, 04:42 PM posted to microsoft.public.access.queries
EricStumpf
external usenet poster
 
Posts: 1
Default 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  
Old April 30th, 2010, 08:41 PM posted to microsoft.public.access.queries
Sylvain Lafontaine[_2_]
external usenet poster
 
Posts: 247
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.