Identity cannot be determined for newly inserted rows

Identity cannot be determined for newly inserted rows

Post by Eric » Fri, 01 Jun 2001 00:24:27



Hi everyone!

I have a project written in VB6 with SQL 7. I have a portion that consists
of 4 forms and accesses 6 recordsets. After updating the fields of each
recordset I do an updatebatch. If I then go back and try to change a field
in one of the records, I get the error message "Identity cannot be
determined for newly inserted rows". If I don't do the updatebatch then when
I try to add records to the other recordsets I am violating my key
contraints. Can anyone give me some advice? I don't want to commit the
transaction until they are completely done with all the modifications.

Thanks so much!

Erica

 
 
 

Identity cannot be determined for newly inserted rows

Post by Mark Kirb » Fri, 01 Jun 2001 12:34:35


You can manage the multiple table update with begintrans committrans on your
connection object.  All the calls between begintrans and committrans are
commited together.


Quote:> Hi everyone!

> I have a project written in VB6 with SQL 7. I have a portion that consists
> of 4 forms and accesses 6 recordsets. After updating the fields of each
> recordset I do an updatebatch. If I then go back and try to change a field
> in one of the records, I get the error message "Identity cannot be
> determined for newly inserted rows". If I don't do the updatebatch then
when
> I try to add records to the other recordsets I am violating my key
> contraints. Can anyone give me some advice? I don't want to commit the
> transaction until they are completely done with all the modifications.

> Thanks so much!

> Erica


 
 
 

Identity cannot be determined for newly inserted rows

Post by Eric » Fri, 01 Jun 2001 22:33:48


Mark,

Thanks for the reply. I am using begintrans and committrans on my
connection. The error occurs when I try to modify a record after the rs has
been updated and before commitrans is called to end the transaction.

Thanks,

Erica


> You can manage the multiple table update with begintrans committrans on
your
> connection object.  All the calls between begintrans and committrans are
> commited together.



> > Hi everyone!

> > I have a project written in VB6 with SQL 7. I have a portion that
consists
> > of 4 forms and accesses 6 recordsets. After updating the fields of each
> > recordset I do an updatebatch. If I then go back and try to change a
field
> > in one of the records, I get the error message "Identity cannot be
> > determined for newly inserted rows". If I don't do the updatebatch then
> when
> > I try to add records to the other recordsets I am violating my key
> > contraints. Can anyone give me some advice? I don't want to commit the
> > transaction until they are completely done with all the modifications.

> > Thanks so much!

> > Erica

 
 
 

1. Identity cannot be determined for newly inserted rows

Hi,

I'm trying to run some old code that was originally written in VJ++.  My
code is attempting to update a recordset and I'm receiveing an exception
whose message states, "Identity cannot be determined for newly inserted
rows".

This code used to work on another system, of course my present systen
has .net installed and lots of other new bits and pieces.
Any idea what might be causing this exception?  I've searched the MS
Knowledgebase and MSDN Libraries.

Thanks
Phil

2. E-mail from D3

3. Error - The provider is unable to determine identity for newly inserted rows (0x80040E1B)

4. existence of a file

5. Help and Subscribe

6. The provider is unable to determine identity for newly inserted rows

7. How to find Number of connections made for a database

8. Identify cannot be determined for newly inserted rows

9. Determining newly inserted identity value in DB2 v6

10. How to get Identity column values for newly inserted row

11. get back the identity of a newly inserted row thru ODBC

12. Getting IDENTITY value of newly inserted row