🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #5995

ADOExpress and rowguid columns?

#5995
From: Micke
Date: Wed, 13 Dec 2000 14:37
28 lines
2180 bytes
I'm doing a Db program using ADOExpress, updated n' all, but have run into a
slight annoyance .. the table in question is using a rowguid as primary
index. Now, I can do an Insert just fine, but I need to update a connected
table when the first one is updated, and lo and behold, in neither AfterPost
or similar routines is the rowguid field actually -updated- and I can't do a
requery since I need the rowguid to determine *which* record to reload
anyway ?

Bit of a catch 22, or have I missed something?

I'm using data aware controls and a DBNavigator to enter the "insert" mode,
and also using the DBNavigator function for the "Post". Neither the Action
events in DBNavigator, nor the AfterXXX events on the ADOQuery seem to be
able to update the rowguid field - they DO update for autoincrementing
numbers, which make it even more strange.

Code snippet:

void __fastcall TData::dbUsersAfterPost(TDataSet *DataSet)
{
  AnsiString test1 = Data->dbUsers->FieldByName("UsersID")->AsString;

  A simple breakpoint here shows that ADO believes this field is
000000-0000-0000-0000000000 or similar - a "zero" guid which isn't what is
put into the Db. So how can I "refresh" the ADOQuery recordset with the
actual inserted value and access it? *can* I do it in the first place?

/Micke
Technical Details
Message-ID: <3a37899e$1_1@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!wn4feed!worldnet.att.net!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!212.75.74.3

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,8bbdeb8696c2373d,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2000-12-13 06:40:15 PST
Reply-To: "Micke" <Micke@ekcimNO.SPAM.net>
From: "Micke" <Micke@ekcimNO.SPAM.net>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADOExpress and rowguid columns?
Date: Wed, 13 Dec 2000 15:37:04 +0100
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 212.75.74.3
Message-ID: <3a37899e$1_1@dnews>
X-Trace: 13 Dec 2000 06:37:18 -0800, 212.75.74.3
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!wn4feed!worldnet.att.net!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!212.75.74.3