View Single Post
Old 01-04-2001, 09:40 PM
digitiger digitiger is offline
Senior Member
Join Date: Jan 2001
Posts: 716
Default RE: Query Parameter Question...?

there are two ways

first in case you open the same querry multiple time in same form with different param values then you can create a global variable in form say

form1 : tform;
vlu : variant;

then add a procedure to querry 's even beforeOpen

procedure tform1.query1BeforeOpen(......);
query1.parambyname('prm').value := vlu; // assigning value held in variable to the param before the query opens

then u can carry on changing the value of variable
close the querry and reopen it .

another way is just write the querry script like-
query1.sql.text := 'select * from animals where name = :PRM';

i hope it must solve ur problem
Reply With Quote