parameters on select

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
pwatel
Posts: 39
Joined: Wed 11 Feb 2009 09:42

parameters on select

Post by pwatel » Wed 03 Jun 2009 07:55

hi everyone
if I have

q.sql.text := SELECT FROM atable WHERE MYKEY=:MYKEY
q.ParamByName('MYKEY').value := 'avalue'
q.open

it works well the first time
if I want to set a new value for the parameter and have the query
get a new record(s)

what is the best way
I know that q.close+q.open works but it is a bit primitive
is there a refresh or requery method or ??????you tell me
thanks
Philippe Watel

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 04 Jun 2009 07:05

You should use the Close and Open methods.

pwatel
Posts: 39
Joined: Wed 11 Feb 2009 09:42

thanks

Post by pwatel » Thu 04 Jun 2009 08:28

It will work
primitive but it works (just kidding.....)
PW

Post Reply