Connection string for pass-through query

G

Guest

Hello,

I've created a pass-through query to a SQL Server database. However
whenever I attempt to run the query I am propted to select the DSN
(SQL_TestDatabase). When I do, it works fine. How do I automatically have
the query use this DSN. I've attempted to use the "ODBC Connect Str" in the
properties of the query:

ODBC; DSN=SQL_TestDatabase

When I attempt this I get the following error; "ODBC connection to
SQL_TestDatabase failed". Any suggestions? The SQL_TestDatabase.dsn is
using Windows Authentication.

Thanks in advance.
 
M

MGFoster

franky said:
Hello,

I've created a pass-through query to a SQL Server database. However
whenever I attempt to run the query I am propted to select the DSN
(SQL_TestDatabase). When I do, it works fine. How do I automatically have
the query use this DSN. I've attempted to use the "ODBC Connect Str" in the
properties of the query:

ODBC; DSN=SQL_TestDatabase

When I attempt this I get the following error; "ODBC connection to
SQL_TestDatabase failed". Any suggestions? The SQL_TestDatabase.dsn is
using Windows Authentication.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Just a guess: Make sure the table name(s) don't have "dbo_" as a
prefix. E.g.:

SELECT ...
FROM dbo_Accounts ...

It would probably be:

SELECT ...
FROM Accounts ...
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQ/4t0IechKqOuFEgEQLYDQCguYmEKMsRudYz4zyUq7uRyDe8EZsAnAqT
ETqIu6rXzspylqT848Wiw57R
=3fd9
-----END PGP SIGNATURE-----
 
G

Guest

Thanks for your response. The table name in the query DO NOT have the dbo_
prefix.

Thanks,
Mike
 

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