Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: parameter markers - SQLBindParameter issue



> >I tried the SQLGetDiagField function
> >with the SQL_DIAG_DYNAMIC_FUNCTION identifier to get the kind of
> >statement but this would not tell me the number of parameter markers
> >in the query. Moreover this approach may not work if the user uses a
> >stored procedure in it. I want to avoid parsing the sql statement to
> >get this info.
> 
> To deduce whether or not the SQL is an insert statement, one would
> normally examine the SQL statement and see if it starts with the
> keyword "INSERT". Not a whole lot to parse there...
> 
> I don't know how one would do this if only the statement handle were
> available ... normally, you start with a connection handle and an SQL
> string in order to allocate a statement handle. How is the statement
> handle allocated?
> 

Thanks for the info. The reason why I am not doing something simple
like looking at the first word to see if it is INSERT is because the
user can use a stored procedure named "foo" which has the insert
statement in it! So I want it to be more general. Any suggestions?

Thanks again,
Niles



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.