Recent

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

totya

  • Hero Member
  • *****
  • Posts: 720
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 2.2.6 FPC Ver 3.2.2
Windows 10 Pro 64-bit

LacaK

  • Hero Member
  • *****
  • Posts: 691
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: 720
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