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 / April 2008

Tip: Looking for answers? Try searching our database.

help! run a query with ADO or DAO

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jjj - 16 Apr 2008 12:58 GMT
Hi,

Im desperately trying to run a query with code. I have tried using the Docmd
command which worked but the database Im connecting to has linked tables and
its asking for a password and i dont know how to specify one.

I have tried using ADO ...not many resources on internet I can connect to
the database with connection string but when i say set rs =
cnn.execute("qryMyquery") I get an error.

can anyone help me or point me in the right direction? maybe i could use
DAO??
pietlinden@hotmail.com - 16 Apr 2008 16:59 GMT
> Hi,
>
[quoted text clipped - 8 lines]
> can anyone help me or point me in the right direction? maybe i could use
> DAO??

if you want to return a recordset then you have to use

set rs=cnn.OpenRecordset strObjectName

or similar...

set the password stuff in the connection properties.
John - 19 Apr 2008 15:29 GMT
Right

Let me give you some facts

Access 2000, Windows 2000, trying to connect to Sybase system 11, I have
tried a dsn, i have tried a UDL etc etc - i think there may be a problem
with the ODBC driver...
On Apr 16, 6:58 am, "jjj" <d...@ff.com> wrote:
> Hi,
>
[quoted text clipped - 10 lines]
> can anyone help me or point me in the right direction? maybe i could use
> DAO??

if you want to return a recordset then you have to use

set rs=cnn.OpenRecordset strObjectName

or similar...

set the password stuff in the connection properties.
 
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.