Article View: borland.public.cppbuilder.database.ado
Article #131BDE replacement for ->SetKey and ->GotoKey
From: Mtronix
Date: Tue, 16 Oct 2007 12:57
Date: Tue, 16 Oct 2007 12:57
25 lines
1605 bytes
1605 bytes
Hello,
I have the following code
bool Table::GoTo (TTable *DataSet, const AnsiString &Field,
const AnsiString &Value)
{
DataSet->IndexName = Field;
DataSet->SetKey();
DataSet->FieldByName(Field)->AsString = Value;
if (!DataSet->GotoKey())
{
// Record wasn't there
Debug_Printf (0, "GoTo in module Table: Couldn't find value [%s] in field
"
"[%s]\n", Value.c_str(), Field.c_str());
return false;
}
return true;
}
I am now using ADO instead of BDE. All I should have to change is TTable to
TADOTable. However, TADOTable does not contian ->SetKey or ->GotoKey
memebers. Does anyone have any idea what I can use to replace this?
Thanks
Technical Details
Message-ID:
<4714b54a$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10698b,f3a8ab22688d6ecc,start X-Google-Attributes: gid10698b,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Mtronix" <mleitheiser@minnetronix.com> From: "Mtronix" <mleitheiser@minnetronix.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: BDE replacement for ->SetKey and ->GotoKey Date: Tue, 16 Oct 2007 07:57:46 -0500 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 207.250.0.174 Message-ID: <4714b54a$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1192539466 207.250.0.174 (16 Oct 2007 05:57:46 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail