21 Jan 2005, Identity column error for update/save on newly added record after first save.

  • Thread starter Thread starter Sham Yemul
  • Start date Start date
S

Sham Yemul

Hello,

I recently ported an Access2000 mdb to Access2000 adp. There were few
autonumber fields in few tables in old database, so I used Identity columns
for those fields in new .adp.

I am using ADO 2.6 and Sql Server 2000(without service packs)
and unbound forms that are filled up using ADO recordset.

It works fine for AddNew/Save but immediately after saving record if user
changes some data and again clicks on Save it echos error, "Identity value
can not be determined for newly inserted row".

If I navigate after AddNew/save and then make changes and then save(update
recordset) it works fine.

Please if you have any suggestions or solution for this please let me know.

Regards
[Sham]
 
Sorry, but you are using unbound forms; which means that your pieces of code
dealing with ADO are more relevant than the fact of using MDB or ADP. (And
personally, I don't see any advantage of using ADP over MDB if you are using
unbound forms.)

Maybe adding the option adSeeChanges will help you.

Using Access 2000 and SQL-Server without any service packs is also running
(fast) for trouble.

S. L.
 
Hello,
Thank you for the reply.
I need stored procedures/views to be used so using adp so that combo's etc
can be set to.

I tried with dbseechanges options , no use. It works fine if I add then
save. but immediately after save I make some changes and again save , it
echos error.

For to install Sql service pack 3 , i am getting error invalid instance so
that also could not do.

Regards
[Sham]
Sylvain Lafontaine said:
Sorry, but you are using unbound forms; which means that your pieces of code
dealing with ADO are more relevant than the fact of using MDB or ADP. (And
personally, I don't see any advantage of using ADP over MDB if you are using
unbound forms.)

Maybe adding the option adSeeChanges will help you.

Using Access 2000 and SQL-Server without any service packs is also running
(fast) for trouble.

S. L.

Sham Yemul said:
Hello,

I recently ported an Access2000 mdb to Access2000 adp. There were few
autonumber fields in few tables in old database, so I used Identity
columns
for those fields in new .adp.

I am using ADO 2.6 and Sql Server 2000(without service packs)
and unbound forms that are filled up using ADO recordset.

It works fine for AddNew/Save but immediately after saving record if user
changes some data and again clicks on Save it echos error, "Identity value
can not be determined for newly inserted row".

If I navigate after AddNew/save and then make changes and then save(update
recordset) it works fine.

Please if you have any suggestions or solution for this please let me
know.

Regards
[Sham]
 
Back
Top