Computing.Net > Forums > Programming > VB, SQL server

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB, SQL server

Reply to Message Icon

Name: Carl
Date: March 27, 2002 at 01:41:52 Pacific
Comment:

Hi,

How can I automatically increment an ID-field in a MS SQL Server 2000 table?

scenario:
I want to add a record to a database with an ADO command object from VB. I am calling a stored procedure with this command with the apropriate values for the record as parameters.
But I don't want to generate an ID from VB, but rather let SQL server assign one automatically.

How is this done mostly??
(by a trigger?)
If it is not to much work, please give me an example.

Thanx......



Sponsored Link
Ads by Google

Response Number 1
Name: carl
Date: March 27, 2002 at 02:10:53 Pacific
Reply:

don't bother, I found it.

It's just choosing int and setting the identity property to yes.



0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB, SQL server

VB.NET Programming for SQL Server www.computing.net/answers/programming/vbnet-programming-for-sql-server/8306.html

SQL Server Help www.computing.net/answers/programming/sql-server-help/13106.html

SQL Server, Oracle linked server www.computing.net/answers/programming/sql-server-oracle-linked-server/7518.html