Subject Re: [firebird-support] How do you determine the parameter names of an insert statement?
Author Martijn Tonies
> Is there another API call to return the column name of the following
> insert stmt:
>
> insert into Staff values(?, ?, ?, ?, ?)
>
> I used "isc_dsql_prepare(status, &hTrans, &hStmt, 0,
> (LPSTR)(LPCTSTR)strSql, 1, NULL)" to prepare the statment.
>
> I then use "isc_dsql_describe_bind(status, &hStmt, 1, pInSqlda )"
> twice to determine the binding parameter's sqltype and sqlen witht the
> first call with sqln set to 1, which return sqld set to reflech the
> correct number of parameters. I then allocate the proper number of
> sqlvar for the second call.
>
> But the returned sqlname info is blank and the sqlname_len is zero
>
> I don't want to hardcode the column name adn want to determine the
> column name and type at run time. I got the sqltype not problem from the
>
> Any help is appreciated!

Parameters aren't named.

Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com