Filter and Locate

Discussion of open issues, suggestions and bugs regarding Virtual Data Access Components for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
FerCastro
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City
Contact:

Filter and Locate

Post by FerCastro » Mon 07 Apr 2014 20:11

Hello all

I am trying to use the locate method whith the following code:

VTPCon.Locate('ID_Emp;CCon', VarArrayOf(['nID_Emp;cClaveCon']), []);

But I can not locate the record. Is there something wrong?


---
I am trying to filter the same virtual table with the following code:

VTPCon.Filter := 'ID_Emp = ' + VTMov.FieldByName('ID_Emp').AsString;
VTPCon.Filtered := true;


---

Do am I missing something? Thanks and best regards!!
Last edited by FerCastro on Tue 08 Apr 2014 14:12, edited 1 time in total.

FerCastro
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City
Contact:

Re: Filter and Locate

Post by FerCastro » Mon 07 Apr 2014 22:23

Locate is orking fine, but the filter still doesn't works.

Any sugestion?

Regards!!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Filter and Locate

Post by AlexP » Tue 08 Apr 2014 09:28

Hello,

Judging by the code

Code: Select all

VTPCon.Filter := 'ID_Emp = ' + VTMov.FieldByName('ID_Emp').AsString;
FNominaData.VTPeriodoConceptos.Filtered := true;
You are setting the filter value in the VTPCon table, and the Filtered parameter value - in the VTPeriodoConceptos table. Please make sure you are working with one and the same table

FerCastro
Posts: 47
Joined: Mon 26 Jun 2006 17:32
Location: México City
Contact:

Re: Filter and Locate

Post by FerCastro » Tue 08 Apr 2014 14:14

Hello Alex!!

Working fine both procedures!

Thanks and best regards!!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Filter and Locate

Post by AlexP » Wed 09 Apr 2014 07:43

You are welcome. Feel free to contact us if you have any further questions about VirtualTable.

Post Reply