acc2000 ADO, DAO, DOCMD ??

  • Thread starter Thread starter jayes
  • Start date Start date
J

jayes

Hi

I want to run an action query in access via code but it needs to use a
system DSN.

A)I tried Docmd - but there was no way i could specify a dsn - is this
correct?
B)DAO - not sure of the syntax

C)I have considered ADO:

dim cnn as adodb.connection
dim myrs as adodb.recordset

set cnn = new adodb.connection
cnn.open "database=jup;UID=accept;PWD=123;DSN=System 11;"

set myrs = cnn.execute("qryQueryName",adExecuteNoRecords)

myrs.close
set myrs = nothing
cnn.close
set cnn = nothing


My question is will this definetly work ??and are there any possible
exceptions that might happen?

Thank You
 
Curious how you are trying to capture the results of the query in a
recordset, and then specify ExecuteNoRecords. You may want to rethink
that.

For correct connection strings check with connectionstrings.com.

Perform the test, and you will know if this definitely works :-)

-Tom.
 

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

Back
Top