tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: OT: PreparedStatement with dynamic parameter list
Date Tue, 01 Apr 2003 15:52:01 GMT

The SQL parameter passed to java.sql.Connection.preparedStatement() is a 
String.  You can write whatever logic you want to build that string, 
including counting the number of arguments obtained from somewhere else and 
building the right number of placeholders accordingly.  Probably won't be 
very elegant, but certainly possible.

John

On Tue, 1 Apr 2003 10:36:14 -0500, Chakravarthy, Sundar 
<schakravarthy@doas.ga.gov> wrote:

>
> Has anyone constructed a PreparedStatement where the number of ?s ( i.e
> bind variables ) is unknown at compile time  ?
>
> Is there any support of that in JDBC ?
>
> Thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message