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.

Signature
Craig
Alex Dybenko - 11 Mar 2008 10:34 GMT
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

Signature
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
> I'm using Access xp.
>
[quoted text clipped - 35 lines]
>
> Thanks.
Craig - 11 Mar 2008 20:43 GMT
Thanks Alex.

Signature
Craig
> Hi,
> the rule is - when you open recordset for updating - then you need to use
[quoted text clipped - 43 lines]
> >
> > Thanks.