wood burning stoves 2.0*
The moose likes JDBC 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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Auto Numbers SQL Server-------Entity bean" Watch "Auto Numbers SQL Server-------Entity bean" New topic
Author

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

suzi lu
Greenhorn

Joined: Jan 05, 2001
Posts: 17
Hi,
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
Tx,
Suzi
John Bateman
Ranch Hand

Joined: Mar 09, 2000
Posts: 320
Hi
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: http://aspose.com/file-tools
 
subject: Auto Numbers SQL Server-------Entity bean