BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to treat server autoinc fields in a clientapp

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Ohlenroth Markus
Guest





PostPosted: Wed Sep 13, 2006 3:34 pm    Post subject: how to treat server autoinc fields in a clientapp Reply with quote



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





PostPosted: Wed Sep 13, 2006 7:46 pm    Post subject: Re: how to treat server autoinc fields in a clientapp Reply with quote



Like most database questions the answer depends on which database
server you are using.

--
Bill Todd (TeamB)
Back to top
Ohlenroth Markus
Guest





PostPosted: Thu Sep 14, 2006 3:12 pm    Post subject: Re: how to treat server autoinc fields in a clientapp Reply with quote



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





PostPosted: Thu Sep 14, 2006 7:27 pm    Post subject: Re: how to treat server autoinc fields in a clientapp Reply with quote

See http://bdn.borland.com/article/20847

--
Bill Todd (TeamB)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.