Recent

Author Topic: TDataSet.Locate without change position  (Read 1580 times)

totya

  • Hero Member
  • *****
  • Posts: 636
TDataSet.Locate without change position
« on: May 03, 2015, 05:23:46 pm »
Hi!

From help: "If a record is found that matches the criteria, then the locate operation positions the cursor on this record, and returns True."

Okay, but now I want to know, this value exists or not, without position is changed.
This is possible anyhow?

(store an restore position isn't good idea)

Thanks!




BitBangerUSA

  • Full Member
  • ***
  • Posts: 183
Re: TDataSet.Locate without change position
« Reply #1 on: May 03, 2015, 05:41:05 pm »
sounds like you are asking for/about 'Lookup'
http://www.freepascal.org/docs-html/fcl/db/tdataset.html
Lazarus Ver 1.4.0 FPC Ver 2.6.4 SVN 48774 32-bit
Windows 7 U 64-bit

LacaK

  • Hero Member
  • *****
  • Posts: 605
Re: TDataSet.Locate without change position
« Reply #2 on: May 03, 2015, 07:07:54 pm »
From help: "If a record is found that matches the criteria, then the locate operation positions the cursor on this record, and returns True."
And help http://www.freepascal.org/docs-html/fcl/db/tdataset.locate.html continues:
If no record is found to match the criteria, False is returned, and the position of the cursor is unchanged.

totya

  • Hero Member
  • *****
  • Posts: 636
Re: TDataSet.Locate without change position
« Reply #3 on: May 03, 2015, 09:17:08 pm »
sounds like you are asking for/about 'Lookup'
http://www.freepascal.org/docs-html/fcl/db/tdataset.html

Hi!

Thanks for the answer, I will try it!

 

TinyPortal © 2005-2018