Repost,A2k/MSDE200- Identity column error for update/save on newlyadded record after first save.

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

Sham Yemul

Subject : Repost,A2k/MSDE200- Identity column error for update/save on
newly added record after first save.

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
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]
 
are there any triggers on the table into which you are inserting?

are you sure you mena the forms are unbound? if so, then when is record
getting saved and where is that message coming from?
 
1. There are no triggers on insert or no triggers fire while inserting.

2. Yes the forms are unbound, we are using ADO recordset to add and
update data. recordset.Addnew and then set each fields in recordset with
values from controls and then recordset.update.

3. I am getting error when user changes to fields(on form) and then
click to Save button typically if he recently added new record and
saved. The save button has code to set values from Form to recordset
fields and then recordset.update. I am getting error recordset.update line.
Such problem I had in Access97/2000 for DAO, I use to use bookmark
method that solved the problem. I don't know what's equivalent solution
in Access2002/ADO.

Thanks for your time.

Regards
[Sham]
Malcolm said:
are there any triggers on the table into which you are inserting?

are you sure you mena the forms are unbound? if so, then when is record
getting saved and where is that message coming from?

Subject : Repost,A2k/MSDE200- Identity column error for update/save on
newly added record after first save.

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
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]
 
if you have a text or ntext fields in your table - make sure you also have a
timestamp field

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

Sham Yemul said:
1. There are no triggers on insert or no triggers fire while inserting.

2. Yes the forms are unbound, we are using ADO recordset to add and
update data. recordset.Addnew and then set each fields in recordset with
values from controls and then recordset.update.

3. I am getting error when user changes to fields(on form) and then
click to Save button typically if he recently added new record and
saved. The save button has code to set values from Form to recordset
fields and then recordset.update. I am getting error recordset.update line.
Such problem I had in Access97/2000 for DAO, I use to use bookmark
method that solved the problem. I don't know what's equivalent solution
in Access2002/ADO.

Thanks for your time.

Regards
[Sham]
Malcolm said:
are there any triggers on the table into which you are inserting?

are you sure you mena the forms are unbound? if so, then when is record
getting saved and where is that message coming from?

Subject : Repost,A2k/MSDE200- Identity column error for update/save on
newly added record after first save.

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
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]
 
Alex said:
if you have a text or ntext fields in your table - make sure you also have a
timestamp field
Hello Everybody,

I am suprised to get result when I used currentproject.connection
instead of connection created using connection string.
Its working fine now !.

Thanks for the suggestions.
Regards
[Sham]
 
Back
Top