Having problems with ADO Connection using Access Runtime on XP

P

P Van Veen

strConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
strPathName & ";Persist Security Info= False"
adoCN.ConnectionString = strConnectionString
adoCN.Open

On Error GoTo CheckforDuplicates

Set adoRS = New ADODB.Recordset
adoRS.CursorType = adOpenKeyset
adoRS.LockType = adLockOptimistic
adoRS.Open "RtClients", adoCN, , , adCmdTable
Set rst = db.OpenRecordset("Customers", dbOpenDynaset)
rst.LockEdits = True

I have an Access 2000 application that was built and distributed with
runtime. When the code tries to open an ADO recordset if run on XP OS
Computer that does not have an MS Office licenced product installed on it,
the code fails . It runs ok on windows 98 and 2000
 
S

Scott McDaniel

What error message do you receive? Could _possibly_ be problems with
different versions of .dll files on your target machines (check out the
VersionChecker Tony Toews wrote on his web site, Google for his name an MS
Access and you'll find it). Also, your code reference a variable you don't
declare, and it appears the rst variable is attempting to open a DAO
recordset. If this is the case, you should disambigualte your references:

Dim rst As DAO.Recordset
Dim rs As ADODB.Recordset
 
P

P Van Veen

Thanks I will check the dll versions as suggested and post my results.

RE: references DIM statments are made at start of code. I did not show these
to keep the example compressed.
 
V

Van T. Dinh

Any particular reason you used a ADO Recordset and 1 DAO Recordset?

Which line of code errors out? Error Number? Error Message?

Have you included both ADO & DAO Library in the References of your database?
 

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