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 

CPP 6.0 TBDEDataSet::Locate()

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases
View previous topic :: View next topic  
Author Message
Pete
Guest





PostPosted: Sun Jan 01, 2006 4:09 pm    Post subject: CPP 6.0 TBDEDataSet::Locate() Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases 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.