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

HELP!!!!!!! SQL Query

Status
Not open for further replies.

Jusenkyo

Programmer
Aug 16, 2002
295
GB
Hi guys

I am trying automatically rebuild one of my databases, that has some ODBC links in it. Obviously each time I open the table, a password is requested.
So I have created a passthrough query that opens the ODBC link, and then when I open the table - it works!

The only problem is - some of the tables dont seem to work with this passthrough. SO I have created passthrough queries that open a record in these tables that dont work, and put them in a macro that runs the passthroughs and then opens the tables.

BUT I have a little trouble with some of my SQL. the following passthrough works perfectly :

SELECT HUBE.APPLICATION.APPLIC_ID
FROM HUBE.APPLICATION
WHERE (((HUBE.APPLICATION.APPLIC_ID)=21))

BUT this SQL (which opens a different table) does not work:

SELECT HUBE_ACCOUNT_TAX_VAT.PERCENTAGE
FROM HUBE_ACCOUNT_TAX_VAT
WHERE (((HUBE_ACCOUNT_TAX_VAT.PERCENTAGE)=80))

Any ideas why one works and not the other. Or BETTER STILL -have you any ideas of how I can open up the connection once with a set password, and it to stay open for me to open however many tables I want to?


HELP!!!!!
 
Are all of the tables and pass-through queries using the same DSN and connection string? If they different DSNs, that would explain why you can open some after running a pass-through query and others after running a different pass-through.

Basically, it appears that you've saved the connection password for the pass-throughs but not for the tables. You can either update the connections strings to use the same DSN for all tables and queries or make sure the password is saved in the connection string when linking tables and creating pass-throughs. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
How do you set the username and password for tables?

At the moment whenever I open one up, it asks me for the details. I want it to remember the username and password, so that I never have to type it in again!
 
So far as I have been able to determine, you'll have to delete the linked table and relink. When you do so, make sure you check Save Password on the screen where you select the tables to be linked. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top