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 

Locate method

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (Desktop)
View previous topic :: View next topic  
Author Message
Ron Sawyer
Guest





PostPosted: Mon Dec 15, 2003 12:11 am    Post subject: Locate method Reply with quote



I have been trying to use the locate method to locate a database that is
indexed on two integer fields.

Database:
long BitID;
long TokenID;

I have tried a variety of ways of setting up the variant, the most
recent being:
bool Found;
Variant Tmp[] = { TokenID, MyBitID};
Found = MyBitTable->Locate("TokenID;BitID",
Tmp,
Opts);

The help indicates that I should use the OPENARRAY macro, but I can't
find any help on how to use it, so I'm turning to you guys for help.

Thanks
Back to top
bcb
Guest





PostPosted: Mon Dec 15, 2003 5:29 am    Post subject: Re: Locate method Reply with quote



Hi Ron

Please try,

Variant locvalues[2];

locvalues[0] = Variant(TokenID);
locvalues[1] = Variant(MyBitID);

bool found = MyBitTable->Locate("TokenID;BitID", VarArrayOf(locvalues,1),
Opts);


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