🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #209

MS-SQL 'identity' field value

#209
From: Sydney Delieu
Date: Thu, 10 Jun 2004 13:28
24 lines
1467 bytes
Hello,

I have a TRemoteDataModule that contains an TADOQuery (q1) and a
TDataSetProvider (dsp1). q1 uses persistent fields, the database is
MS-SQL Server 2000.

q1->SQL->Text = "select * from trans where tra_id = :TransID";

tra_id is an MS-SQL Server 'identity' field (auto-incrementing field).


On the client-side I have a TWebConnection (webConn) and a
TClientDataSet (cds1). If I insert a new record and then perform a:

cds1->ApplyUpdates(-1);

the record does inserts correctly, but the value of tra_id is not sent
back to cds1.

What do I need to do to make the DataSetProvider return the value of
the identity field (AutoInc field) to the ClientDataSet using the above?

Thanks,
Syd.
Technical Details
Message-ID: <40c86215@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,112d01a1b7c17ea2,start
X-Google-Attributes: gidfcd2b,public
From: "Sydney Delieu" <syddel@hotmail.com>
Subject: MS-SQL 'identity' field value
Newsgroups: borland.public.cppbuilder.database.multi-tier
User-Agent: XanaNews/1.16.3.1
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 81.137.14.60
Message-ID: <40c86215@newsgroups.borland.com>
Date: 10 Jun 2004 06:28:53 -0700
X-Trace: newsgroups.borland.com 1086874133 81.137.14.60 (10 Jun 2004 06:28:53 -0700)
Lines: 26
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!fu-berlin.de!newsfeed.iinet.net.au!newsfeed.iinet.net.au!PeerFeed.KWeb.on.ca!news.kweb.on.ca!newsgroups.borland.com!not-for-mail