MySQL Forums
Forum List  »  Stored Procedures

Re: Dynamic Sql Statement in SP
Posted by: Roland Bouman
Date: January 12, 2006 03:11AM

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!

Options: ReplyQuote


Subject
Views
Written By
Posted
2758
January 09, 2006 06:22AM
1481
January 09, 2006 08:06AM
1219
January 09, 2006 02:10PM
1801
January 09, 2006 08:02PM
1685
January 10, 2006 12:24AM
1459
January 10, 2006 03:07AM
1674
January 10, 2006 06:51AM
1397
January 10, 2006 01:49PM
1742
January 10, 2006 06:35PM
1546
January 10, 2006 07:22PM
1632
January 10, 2006 10:33PM
1628
January 11, 2006 03:10AM
2200
January 11, 2006 04:27AM
1656
January 11, 2006 06:54AM
1489
January 11, 2006 03:34PM
1649
January 11, 2006 03:56PM
1637
January 12, 2006 03:20AM
1446
January 12, 2006 04:44AM
1418
January 11, 2006 09:08PM
Re: Dynamic Sql Statement in SP
1666
January 12, 2006 03:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.