Can't be done. A Stored Proc at run time would essentially be an SQL statement passed to the server anyway. Do something like:
cdsTasks.Close;
qryTasks.SQL.Clear;
gFullText := 'select cf.casegen, cf.taskstep, cf.taskpriority, cf.taskassigned, cf.status, cf.taskdep, cf.loanstr, ' +
'cf.taskdate, tl.taskgen, tl.taskname, tl.taskdept, tl.tasktype from casefile cf, tasklookup tl ' +
'where (cf.taskstep = tl.taskgen) and (cf.status <> ' + QuotedStr('H') + ') and ' +
'(cf.status <> ' + QuotedStr('C') + ') and (cf.deletedflag <> ' + QuotedStr(gcYES) + ') and ' + GetDepts;
qryTasks.SQL.Text := gFulltext;
ShowMessage(qrytasks.sql.t
cdsTasks.Open;
Main Topics
Browse All Topics





by: MotazPosted on 2001-12-31 at 00:34:15ID: 6702107
I tried to do that once but I get an error, and this is my try, if you can run it let me know.
- Drop IBQuery
- Drop memo and put this in it's text:
create PROCEDURE AddFirst
(
ID Integer,
Name VarChar(30),
Address VarChar(30)
)
AS
begin
Insert into First (ID, Name, Address)
values
(
:ID ,
:Name,
:Address
);
end
- Write this in a button click:
IBQuery1.SQL.Text:= Memo1.Lines.Text;
IBQuery1.ExecSQL;
Motaz