Getting an IDENTITY value BEFORE an insert, other stuff!

Getting an IDENTITY value BEFORE an insert, other stuff!

Post by Tracy Norr » Thu, 14 Dec 1995 04:00:00



I am using Borland's Delphi (Client/Server) and Sql Server 6.0. Does
anyone
have a way to get the "soon-to-be" value of an identity column before an
insert? How about a stored procedure to gen unique IDs instead of using
the
IDENTITY column type?

WARNING: Delphi & SQL Server 6.0 will fight like cats and dogs if you
attempt to use an IDENTITY (unique index) column as a Primary key. The
Borland Database Engine (BDE) get's totally lost if Sql Server gens a
value
for the primary key. The BDE is expecting the key value to be written to
the
database along with the record. Watch out for any stored procedures, etc
that modify a just-inserted record's key values. I have not had this
problem
with Gupta's SQLWindows 5.01 ;^

Tracy

 
 
 

1. Getting Back Identity column value on Insert using RDS

 Does anyone know of an easy way to get back the identity column value on an
insert using
RDS from a web page ?


to work with RDS. It always
returns NULL, may be because RDS drops the connection after each query ?

Sending the insert record to a DCOM object on the server and have that do
the insert and the return the identity value seems to be the only solution
to me. Is there anyway to avoid this extra step ?

Thanks in advance for any suggestions

Sundar B

2. How to remove Replication and start again?

3. getting identity value after insert

4. HELP! Can't Conect to an MSACCESS Database!

5. Getting back an identity field value after an insert SQL statement

6. Impact Assessment of database changes

7. Getting the value of an autoincrement or identity field during an sql insert

8. RDA Pull error

9. Getting the identity value of a newly inserted row

10. Getting the new identity value from an Insert query

11. Getting IDENTITY value of a row that was just INSERTED

12. Getting the value of an autoincrement or identity field during an sql insert

13. Getting IDENTITY value BEFORE an insert(?!)