Subject Re: [ib-support] Help On Stored Procedures
Author Martijn Tonies
> here is the part of my Delphi code where am trying to create a stored
> procedure...
>
> SQLQuery1.SQL.Add( 'CREATE PROCEDURE SPGETDRID_TEMP( DRID VARCHAR(50))
> RETURNS (RET_DRID VARCHAR(50)) AS');
> SQLQuery1.SQL.Add( 'BEGIN');
> SQLQuery1.SQL.Add( 'SELECT DR_ID FROM TEMPDRS WHERE DR_ID = :DRID INTO
> RET_DRID;');
> SQLQuery1.SQL.Add( 'SUSPEND;');
> SQLQuery1.SQL.Add( 'END');
>
> try
> TD.TransactionID := 2;
> TD.IsolationLevel := xilREADCOMMITTED;
> SQLConnection1.StartTransaction(TD);
> SQLQuery1.ExecSQL;
> SQLConnection1.Commit(TD);
> except on e: EDatabaseError do
> begin
> SQLConnection1.Rollback(TD);
> LogFile.Log(e.Message);
> end;
> end;
>
> am getting an ERROR saying "No Value for parameter 'DRID'." and its
> exiting.. without creating...

Set ParamCheck to False.

Because you (have to) write ":DRID" - the Delphi component thinks it's a
parameter, however, this is a single statement that doesn't need
param-checkig.

> any help greatly appreciated...
> Kiran Kumar.

Yes, well - this kind of information in your FIRST email is appreciated as
well.


With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."