Page 1 of 1

parameters on select

Posted: Wed 03 Jun 2009 07:55
by pwatel
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

Posted: Thu 04 Jun 2009 07:05
by Plash
You should use the Close and Open methods.

thanks

Posted: Thu 04 Jun 2009 08:28
by pwatel
It will work
primitive but it works (just kidding.....)
PW