Guy Picton Phillipps wrote:
Dear Listers,
I am a newbie with Apache Cocoon and am trying my hand connecting to a MySQL
database, with some difficulty. I have researched alot and still cannot find
the answer to this problem.



&snip;

Hmm, everything looks kosher. It appears the SQLTransformer is not SQLTransforming :)

You said you copied the mysql jar into the tomcat lib directory... did you restart 
Tomcat after this?

The output is not what I was expecting, which should be a list of names - is
there a problem with the way I have set up the database connection?

Nope, this looks OK.

Do I
need to add a different serializer to view the output? I was under the
impression that the XML serializer would deliver the raw SQL data to the
browser.

Nope, the XML serializer is OK.

The SQL Query "select admin_name from wards" works from the MySQL
prompt.

Any help will be greatly appreciated as I have no idea why this is
happening.....

Hmm, if the SQLTransformer is not transforming, I would think that it has something to do with your namespaces in the source document.


What if you try declaring the SQL namespace at the root tag:

<document xmlns:sql="xmlns:sql="http://apache.org/cocoon/sql/2.0";>

and then just use:

<sql:execute-query>
  <sql:use-connection>ward_connect</sql:use-connection>
  <sql:query>select admin_name from wards;</sql:query>
</sql:execute-query>


Regards,

Tony


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to