ADO 2.1/SQL Server 6.5 - IDENTITY Question 
Author Message
 ADO 2.1/SQL Server 6.5 - IDENTITY Question

i'm developing a Cliente/Server App in VB 6 using ADO 2.1. Then database
back-end is a SQL Server 6.5 database.

This app is to be used by 15 or more simultaneous users. My problem concerns
on how can i do an insert into one table that as an Identity column and get
that value ??

i'm using SQL statments to do the insert using the Execute method of the
ADODB.Connection object. I need to insert one record in the master table,
and then
gather the Identity Column value so i can insert values in a details table.

I don't think that querying the database for the MAX value in that table
would work cos
in a multi user enviroment, i will be in risk that the value it returns will
be one inserted by
another user.

I'm doing this inside a transaction, so i must gather the value that isn't
yet in the database.

How can i do this????

Thanks for the time you spent reading this mail.

Thanks for your help!!



Sat, 27 Oct 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ADO 2.1/SQL Server 6.5 - IDENTITY Question

2. Data objects closed error in ADO 2.1 and SQL server 6.5

3. @@IDENTITY problem with VB432/SQL Server 6.5

4. VB 4.0 & SQL Server 6.5 (Identity Column)

5. ADO, Identity in SQL 6.5, AddNew, not working...

6. Need to Save .rpt files in SQL Server 7.0 with ADO 2.1

7. ADO 2.1 & SQL Server installed

8. sql server 6.5 ado error

9. ADO OLEDB SQL Server 6.5

10. Strange Behavior - ADO and SQL Server 6.5

11. ADO 2.0 connection to SQL Server 6.5

12. SQL Server 6.5 & VB6 ADO

 

 
Powered by phpBB® Forum Software