KWPro.net

Phing and PDO/PDOExecSQLTask
By: conark
Published On: 2-3-2010

Just discovered that the documentation on Phing's website has been poorly done regarding this.  If you want to use the PDOExecSQLTask, you're supposed to just use "pdo" rather than "pdoexecsql" as in the way the top example shows it.  However, the documentation shows two examples, which makes this seem confusing.  Unfortunately, I just spent a good hour or so trying to figure out why my task kept saying:

Could not create task/type: 'pdosqlexec'. Make sure that this class has been declared using taskdef / typedef.

I think that the documentation was being ported from Ant because I caught this line:

"Wrapper for a single transaction. Transactions allow several files or blocks of statements to be executed using the same JDBC connection and commit operation in between."

Obviously, we're using PDO NOT JDBC as stated.  Hopefully, the maintainers of this documentation can fix this problem.  And hopefully, anyone else using Phing and this task can stumble upon this article to correc the mistake.  Trust me, I looked on Google and couldn't find a single problem and only 5 references or so to PDOExecSQLTask.

AddThis Social Bookmark Button Sphere: Related Content

Trackbacks: (Trackback URL)

Comments

Comment By: Pete Ford
Posted On: 5-19-2010

Your post has made it to google now - thanks for the tip

July [August] September
Sun Mon Tue Wed Thu Fri Sat
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 1 2 3