Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 SQL Identity

Author  Topic 

Anja
Starting Member

1 Post

Posted - 2003-09-18 : 07:25:51
How can I control(SET ON/OFF) Identity columns through VB6.

mgomezc
Starting Member

1 Post

Posted - 2003-09-18 : 08:04:30
Hi Anja,

I guess it would be enough to send the "SET IDENTITY_INSERT <table> ON" command over your db connection, something like

objConnection.Execute "SET IDENTITY_INSERT ON"

Here we make something alike to stablish the date format to the one we want.


Best regards,
Wilson
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-09-26 : 13:14:34
Also, use SCOPE_IDENTITY instead of @@IDENTITY. @@IDENTITY can be incorrect sometimes.

Tara
Go to Top of Page
   

- Advertisement -