 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Pete Guest
|
Posted: Sun Jan 01, 2006 9:09 pm Post subject: CPP 6.0 TBDEDataSet::Locate() |
|
|
I am having fits with some calls to TBDEDataSet::Locate(). My issue
seems to occur when one of the target parameters is an AnsiString. The
code in use is:
Variant V[2];
V[0] = SubjectLineParser->BasicSubject;
V[1] = SubjectLineParser->PartNumber;
Variant W = VarArrayof(V, 1);
if (Data->taDownloadedArticlePart->Locate("BasicSubject;PartNumber",
W, TLocateOptions()))
{
}
V[0] receives an AnsiString property from a parser, V[1] an integer.
W is used to faciliate debugging so I can see what the macro VarArrayOf
is creating.
The table in question's primary index is on BasicSubject (a string
field) and PartNumber (an integer field).
The call to Locate() always returns false although the table clearly
contains the sought record. The debugger shows that when Locate() is
called V is initialized with the desired content but W's content is
shown as { ???? }, so somehow the variant array W is not being
initialized as I wish but I have no clue why.
This same code works fine in numerous cases when none of the target
fields are strings.
Any suggestions?
--Pete |
|
| Back to top |
|
 |
|
|
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
|
|