Re: Dynamic Sql Statement in SP
Ming Yeung wrote:
> :- I thought of that but I think it is only OK for
> a static Sql statement, because some of my sql
> statements are dynamically created denepding on
> the parameters. Because I don't want to implement
> some Sql stmts using "EXECUTE STMT USING @p1,@p2",
> and some others using MyOwnFunction(). So, I just
> want to make them consistency by using only one
> method.
You're the developer - you know what's best for your particular situation.
> > Thanks! I will test for a bit with this DBCP
> bit (that's the connection pooling stuff right?)
>
> Yeah, that's right. But DBCP is only for Java, if
> you just want to test connection pooling, Php has
> its own... "p_connect()", which is less trouble.
Well, I know PHP persistent connections screw up with transactions (transaction stays open) - it must mean user variables will screw up too. I thought that because the JDBC spec explicitly expects transactions, a java connection pooling mechanism conforming to jdbc 3 could be smart enough to avoid transaction trouble. Of course, MySQL user variables are not known to the JDBC spec, so it's understandable that these screw up in a JDBC connection pooling mechanism.
Do you know what will happen with transactions in your connection pooling setup? (I'm guessing they are handled correctly.)
> Develop applications is easy, but to develop them
> in "good design pattern" takes time & needs
> experience.
Good luck Ming. I gotta hunch you're doing fine!