Subject | Re: [IBO] ExecuteImmediate |
---|---|
Author | Jason Wharton |
Post date | 2003-01-06T20:39:44Z |
You need to set the sqld value as well as the sqln.
In fact, I think sqld is more important.
sqln is to track how many columns are in the structure and sqld tells how
many are actually intended for use in the execute. This would allow you to
have a structure defined with more column places but separately tell that
only some of them are intended for use.
Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
-- We may not have it all together --
-- But together we have it all --
In fact, I think sqld is more important.
sqln is to track how many columns are in the structure and sqld tells how
many are actually intended for use in the execute. This would allow you to
have a structure defined with more column places but separately tell that
only some of them are intended for use.
Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
-- We may not have it all together --
-- But together we have it all --
----- Original Message -----
From: "Maik Wojcieszak" <mw@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, January 06, 2003 12:16 PM
Subject: [IBO] ExecuteImmediate
> Hi,
>
> can anyone give me an example using IBStatement.ExecuteImmediate
> with input parameters ?
>
> in_sqlda := AllocMem( XSQLDA_LENGTH( 1 ));
> in_sqlda.version := SQLDA_VERSION1;
> in_sqlda.sqln := 1;
>
> val := 'Blah';
> in_sqlda.sqlvar[0].sqldata := PChar(Val);
> in_sqlda.sqlvar[0].sqltype := SQL_TEXT;
> in_sqlda.sqlvar[0].sqllen := Length(val);
>
> dsql.ExecuteImmediate('INSERT INTO FILE_BENCHMARK_TAB (TEST) VALUES
( ? )',
> in_sqlda);
>
> does not work ( invalid type or number of parameters)
>
> thanks,
> maik
>
> -------------------------------------------------
> Maik Wojcieszak
>
> wobe-team (http://www.wobe-team.com)
>