It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes Auto Numbers SQL Server-------Entity bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Auto Numbers SQL Server-------Entity bean" Watch "Auto Numbers SQL Server-------Entity bean" New topic

Auto Numbers SQL Server-------Entity bean

suzi lu

Joined: Jan 05, 2001
Posts: 17
I have auto numbers in many of my SQL-Server tables, how do i update them using my entity benas???Say, i have 5 fields and i set 4 of them and the 5th one is a auto number,does that get inserted automatically???
Pl help
John Bateman
Ranch Hand

Joined: Mar 09, 2000
Posts: 320
Usually just inserting information into a database would automatically update the ID field. Your application server can be configured to do this FOR you, or, to let the SQL server handle it by itself. (I usually leave it alone and let the SQL Server handle the autonumbers/identities etc etc.
You may want to look at the forum specific to your application server. We have message bases covering most of the current popular J2EE app servers.

SOURCE CODE should be SURROUNDED by "code" tags.
I agree. Here's the link:
subject: Auto Numbers SQL Server-------Entity bean
It's not a secret anymore!