sal1150
asked on
table name as paratmeter at runtmie
I have tquery its sqlstring is:
sql:='select id,q,a,r1,r2,r3,level,rand (200) as id2 from quiz order by id2';
How can I put table name in parameter so when I open it again it will use sql string exept change of name of tabe?
example:
tQuery1.SQL.Clear
tQuery1.SQL.add('select id,q,a,r1,r2,r3,level,rand (200) as id2 from MYTABLE order by id2')
tquery1.ParamByName('MYTAB LE').AsStr ing :=OpenDialog1.FileName;
Tquery.open;
sql:='select id,q,a,r1,r2,r3,level,rand
How can I put table name in parameter so when I open it again it will use sql string exept change of name of tabe?
example:
tQuery1.SQL.Clear
tQuery1.SQL.add('select id,q,a,r1,r2,r3,level,rand
tquery1.ParamByName('MYTAB
Tquery.open;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Well there are three valid answers provided. Let him choose one or split the points. Maybe give the points to the first answer, in this case Kretszmar. It looks like he needs the points :) (Just kidding about that.) But again either split or first answer.
Can we please close this so I stop seeing it as open. There are 3 good answers here.