Checking an identity in a disconnected recordset

Checking an identity in a disconnected recordset

Post by Sari » Thu, 02 Dec 1999 04:00:00



Hello,

I am using VB6 with SQL7.0. I'm trying to hold a short transaction to the
database , so I use a disconnected recordset , in the updatebatch mode. But
I use in some of the tables an identity field . When I add a new record to
the recordset I can not figure out the new identity because I'm not
connected to the database.

Is there a way to check the new identity without writing to the database???

Thanks,
Sarit.

 
 
 

Checking an identity in a disconnected recordset

Post by Carl Prothma » Thu, 02 Dec 1999 04:00:00


Sarit,
Take a look at the following ADO FAQ:
http://www.able-consulting.com/ADO_Faq.htm#Q9

--

Thanks,
Carl Prothman, MVP, CCP
http://www.able-consulting.com

ADO FAQ: http://www.able-consulting.com/ado_faq.htm
RDS FAQ: http://www.able-consulting.com/rds_faq.htm


Quote:> Hello,

> I am using VB6 with SQL7.0. I'm trying to hold a short transaction to the
> database , so I use a disconnected recordset , in the updatebatch mode.
But
> I use in some of the tables an identity field . When I add a new record to
> the recordset I can not figure out the new identity because I'm not
> connected to the database.

> Is there a way to check the new identity without writing to the
database???

> Thanks,
> Sarit.


 
 
 

1. Updating Identity field in disconnected recordset

I'm trying to realize following:
SQL Server 7.0, ADODC, DataGrid

Public db as Connection

DataGrid1.Datasourse = ADODC1
set ADODC1.Recordset = db.execute(MySQL)
ADODC1.Recordset.ActiveConnection = Nothing

I edit or add new record from dialog via stored procedure
When stored procedure succesfuly complete I edit or add new record to
ADODC1.Recordset

How can I store Identity of this record?

Thanks for help
--
Verbovsky Innokenty
( ICQ 16999735 )

2. Web enabling legacy code

3. Identity column and Disconnected recordset

4. ODBC Drivers For Visual Foxpro 3.0

5. Disconnect recordset, SQL 2000 and Internet and @@IDENTITY

6. Compressing a database

7. Pls Check my Code - disconnected recordsets!

8. xpsql.cpp: Error 997 from GetProxyAccount

9. ADO fails to release Recordset cursor after opening disconnected Recordset

10. Connected Recordset adPersistXML differs from Disconnected Recordset built in-memory

11. ADO fails to release Recordset cursor after opening disconnected Recordset

12. Locking, disconnect, Check-out Problems

13. Identity Range Errors on disconnected replication