dbseechanges error 3622

C

Craig

I'm using Access xp.

I'm racking my brain over this...I have an Access mdb front-end with a SQL
2005 table linked in via ODBC.

But when I run the following code (this is just a snippet of the
beginning...):

Dim db As Database, rs As Recordset, rs1 As Recordset
Dim strX As String, iLen As Integer
ReDim MyArray(10) As String
Set db = CurrentDb()
Set rs = db.OpenRecordset("qry_Test") <----------ERROR OCCURS
HERE!!!!!!!!!!!!!
Set rs1 = db.OpenRecordset("tblResults")
'
Do While Not rs.EOF
....
....
....

I get this error 3622 (You must use the dbseechanges option with
openrecordset when accessing a SQL server table that has an IDENTITY column.)

So, then I change the offending line of code to this:

Set rs = db.OpenRecordset("qry_Test", dbseechanges)

I still get the same error. But when I change it back - all of sudden IT
WORKS.

Someone PLEASE tell what's going on here???!!!??

EDIT: Now, I'm running another similar query and it won't work at all - no
matter what I try.

Thanks.
 
A

Alex Dybenko

Hi,
the rule is - when you open recordset for updating - then you need to use
dbseechanges like this:

Set rs = db.OpenRecordset("qry_Test", dbopendynaset, dbseechanges)

else you can open it as snapshot, then dbseechanges is not required

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 

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

Similar Threads


Top