locate with 2 fields doesn't work

locate with 2 fields doesn't work

Postby johnkuiper » Mon 09 Jun 2008 14:35

Normally I use only one key to locate a record.
Now I have to find a record with two fields.
This is what I use
Code: Select all
if Virtualtable.Locate('programma_id, lijstnummer',vararrayof([StrProgrid,IntLijstnr]),[])

This occurs an error, because the second field is not found. But the fields are created (seen with virtualtable.getfieldnames).

Is this a bug. Is there another way to find the record except the filter?
johnkuiper
 
Posts: 6
Joined: Tue 06 Nov 2007 17:17

Postby Antaeus » Tue 10 Jun 2008 07:14

You should split fields in the field list with a semicolon, not with a comma:
Code: Select all
if Virtualtable.Locate('programma_id; lijstnummer',vararrayof([StrProgrid,IntLijstnr]),[])
Antaeus
 
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Postby jkuiper_them » Tue 10 Jun 2008 08:30

Sorry :oops:

Normally I'm using one field to find.
jkuiper_them
 
Posts: 28
Joined: Thu 20 Dec 2007 14:48


Return to VirtualDAC