| View previous topic :: View next topic |
| Author |
Message |
Ohlenroth Markus Guest
|
Posted: Wed Sep 13, 2006 3:34 pm Post subject: how to treat server autoinc fields in a clientapp |
|
|
I have a field, "ID" by name, which is autoincremented by the database
server. The server offers this feature.
This field is also a primary key field and is also used by childtables. How
do I handle such a field on the clientside.
Obviously this field has no value as long as a newly created record has not
been written back to the server and refetched.
Must I write every newly created record back to the server first and
retrieve the record together with its new ID before I can go on adding child
records?
Or is it better to do without autoinc values altogether on the server side
and implement a stored procedure server side which fetches a new value.
Any advice would be helpful.
Markus |
|
| Back to top |
|
 |
Bill Todd Guest
|
Posted: Wed Sep 13, 2006 7:46 pm Post subject: Re: how to treat server autoinc fields in a clientapp |
|
|
Like most database questions the answer depends on which database
server you are using.
--
Bill Todd (TeamB) |
|
| Back to top |
|
 |
Ohlenroth Markus Guest
|
Posted: Thu Sep 14, 2006 3:12 pm Post subject: Re: how to treat server autoinc fields in a clientapp |
|
|
Clientside:Windows VCL app,dbExpress components, clientdatasets
Serverside:MS SQLServer 2005
"Bill Todd" <no (AT) no (DOT) com> schrieb im Newsbeitrag
news:450819e0 (AT) newsgroups (DOT) borland.com...
| Quote: | Like most database questions the answer depends on which database
server you are using.
--
Bill Todd (TeamB) |
|
|
| Back to top |
|
 |
Bill Todd Guest
|
|
| Back to top |
|
 |
|