Stacey
What is the exact error message?
Cheers
Martin
-----Original Message-----
From: Stacey Verner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 18, 2000 09:06
To: Multiple recipients of list delphi
Subject: [DUG]: Query Parameters
I am trying to speed up a process. Part of this process contains a loop
which inserts multiple records into a table. The existing code changes the
sql of the query in order to setup parameters.
eg.
Clear;
Add(' insert into fw_programme_cell (');
Add(' cell_id,programme_hdr_id,treat_length_id,');
Add(' fw_year,reason_note,');
Add(' added_on, added_by, chgd_on)');
Add(' select');
Add(' ' + IntToStr(LNewCellId) + ',' + IntToStr(PToID) +
',treat_length_id,');
Add(' fw_year,reason_note,');
Add(' today, USER, ""');
Add(' from z_fw_programme_cel');
Add(' where cell_id = ' +
LQuery2.FieldByName('cell_id').AsString);
ExecSQL;
I want to do this is a parameterised query, but I am not sure of how to go
about it. I have tried the following with no luck. It doesn't like the
parameters for the select fields. I have tried aliasing the parameters.
insert into fw_programme_cell(cell_id
, programme_hdr_id
, treat_length_id
, fw_year
, reason_note
, added_on
, added_by
, chgd_on)
select :p_new_cell_id
, :p_to_id
, treat_length_id
, fw_year
, reason_note
, today
, user
, ""
from z_fw_programme_cel
where cell_id = :p_cell_id
"WS SMTP relay" made the following
annotations on 10/18/00 09:22:24
------------------------------------------------------------------------------
[INFO] -- Content Manager:
[MMSSOV] This e-mail message and any attachments are confidential to Sovereign Limited
and subsidiaries and subject to legal privilege. If you have received this e-mail in
error, please advise the sender immediately and destroy the message and any
attachments. If you are not the intended recipient you are notified that any use,
distribution, amendment, copying or any action taken or omitted to be taken in
reliance of this message or attachments is prohibited.
==============================================================================
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"