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 

TDataset Locate failure

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





PostPosted: Wed Apr 21, 2004 11:58 am    Post subject: TDataset Locate failure Reply with quote



I carry out a locate operation on a simple dataset which works for one set
of values but not another, even though the values exist in the table.

Anybody got any idea why this should happen?

Code is below:

TLocateOptions MOpts;
MOpts.Clear();
AnsiString mKeyFields = "Surname;";
mKeyFields += "MiddleName;";
mKeyFields += "FirstName";
Variant mlocvalues[3];

mlocvalues[0] = Variant(MainForm->sSurName);
mlocvalues[1] = Variant(MainForm->sMiddleName);
mlocvalues[2] = Variant(MainForm->sFirstName);

// Availability
if(StaffAvailability->Locate(mKeyFields, VarArrayOf(mlocvalues, 2),
MOpts))
{
............
}


Any hints much appreciated

George


Back to top
George
Guest





PostPosted: Wed Apr 21, 2004 2:07 pm    Post subject: Re: TDataset Locate failure Reply with quote



OOPS

That will teach me to keep tabs on the state of my filters - lesson learned!

Panic over.

"George" <george (AT) ptarmigan-im (DOT) com> wrote

Quote:
I carry out a locate operation on a simple dataset which works for one set
of values but not another, even though the values exist in the table.

Anybody got any idea why this should happen?

Code is below:

TLocateOptions MOpts;
MOpts.Clear();
AnsiString mKeyFields = "Surname;";
mKeyFields += "MiddleName;";
mKeyFields += "FirstName";
Variant mlocvalues[3];

mlocvalues[0] = Variant(MainForm->sSurName);
mlocvalues[1] = Variant(MainForm->sMiddleName);
mlocvalues[2] = Variant(MainForm->sFirstName);

// Availability
if(StaffAvailability->Locate(mKeyFields, VarArrayOf(mlocvalues,
2),
MOpts))
{
............
}


Any hints much appreciated

George





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.