Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2005

Tip: Looking for answers? Try searching our database.

SQL Pass-through Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Olgun - 09 Mar 2005 19:25 GMT
Hi,

I want to be able to reference a connection included in a module funcion
through the "ODBC Connection Str" property found in the properties window of
a "SQL Pass-Through Query".

Any ideas if this is possible, and if yes, how can I do this?

Any suggestions would be appreciated.

Thanks.
Alex Dybenko - 09 Mar 2005 19:34 GMT
To get a pass-through query connection string you can use following syntax:

debug.print currentdb.querydefs("MyQuery").Connect

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Hi,
>
[quoted text clipped - 8 lines]
>
> Thanks.
Olgun - 09 Mar 2005 19:49 GMT
Thank you for your response Alex. I think I wasn't very clear describing my
problem, let me try to rephrase it.

Ultimately I want to connect to an Oracle database, for some reason the DSN
connection is failing but works when I do this with DSN less connection using
ADO.

So I want the SQL-Pass through connectstr to reference the ADO connection
included in a module. Make sense?

Thanks again for your response.

> Hi,
>
[quoted text clipped - 7 lines]
>
> Thanks.
Alex Dybenko - 09 Mar 2005 20:59 GMT
Hi,
not sure you can use ADO connection string, but you can try to use dsnless
connection string like described here:
http://www.accessmvp.com/djsteele/DSNLessLinks.html

Signature

Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com

> Thank you for your response Alex. I think I wasn't very clear describing
> my
[quoted text clipped - 23 lines]
>>
>> Thanks.
Douglas J. Steele - 10 Mar 2005 01:29 GMT
The sample to which Alex pointed you doesn't actually explicitly spell it
out, but all you need to specify for the connection string is the
appropriate ODBC DSN-less string. Check what Carl Prothman has at
http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm The
"secret" is that you must precede the connection string with ODBC;

Note that you cannot use an Ole DB connection string: Access will only
recognize the ODCB one.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> Thank you for your response Alex. I think I wasn't very clear describing
> my
[quoted text clipped - 23 lines]
>>
>> Thanks.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.