 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
George Guest
|
Posted: Wed Apr 21, 2004 11:58 am Post subject: TDataset Locate failure |
|
|
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
|
Posted: Wed Apr 21, 2004 2:07 pm Post subject: Re: TDataset Locate failure |
|
|
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 |
|
 |
|
|
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
|
|