error 3622 open sql server table with identity column

G

Guest

I am linked to a SQL database. When I run the following code I get "error
3622 open sql server table with identity column"


Set rs = db.OpenRecordset("Select * from tblInventoryItems where
[InvoiceNbr] =" & Me!InvoiceId)

What is the cause of this error and what steps do I need to take to correct
it.

Thanks
 
A

Alex Dybenko

try:
Set rs = db.OpenRecordset("Select * from tblInventoryItems where
[InvoiceNbr] =" & Me!InvoiceId, dbopendynaset, dbseechanges)

if you need updateable recordset

and if you need read-only:

Set rs = db.OpenRecordset("Select * from tblInventoryItems where
[InvoiceNbr] =" & Me!InvoiceId, dbopensnapshot)
 
G

Guest

thanks, that worked great.

Alex Dybenko said:
try:
Set rs = db.OpenRecordset("Select * from tblInventoryItems where
[InvoiceNbr] =" & Me!InvoiceId, dbopendynaset, dbseechanges)

if you need updateable recordset

and if you need read-only:

Set rs = db.OpenRecordset("Select * from tblInventoryItems where
[InvoiceNbr] =" & Me!InvoiceId, dbopensnapshot)

--
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com


Bob said:
I am linked to a SQL database. When I run the following code I get "error
3622 open sql server table with identity column"


Set rs = db.OpenRecordset("Select * from tblInventoryItems where
[InvoiceNbr] =" & Me!InvoiceId)

What is the cause of this error and what steps do I need to take to
correct
it.

Thanks
 

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