Stored Procedures and Parameter binding

Ivan Smahin ivan_smahin at paradigmasoft.com
Fri Sep 28 07:46:54 CDT 2007


Hello Bart,

Friday, September 28, 2007, 3:25:35 PM, you wrote:


> Wouldn't this also work ?

> create or replace procedure DoInsert(param1,param2)
> Begin
>         INSERT INTO tbl1 ( fldLong, fldString ) VALUES ( :1, :2 ) binded
> WITH { param1, param2 };
> End


> Would this work? And if this works could we do without escaping  
> strings ?

No it would not.
Look,  escaping  string is used to deliver prepared string (query) to
the SQL-parser.

So you want something like this:
db.SQLExecute ( "CALL sp1( 'c:\DB' )" )

But parser will get the query as
CALL sp1( 'c:DB' )


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list