cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ypomonh <>
Subject (newbie) Query a given datasource from a javascript flow?
Date Fri, 11 May 2007 13:15:05 GMT
I'm searching an easy way to query a given datasource (defined in) from 
within a flow (javascript). Not using an ORM framework but even plain JDBC.

Have tried to use 

    var db = Database.getConnection("mydatasource");
    var queryVal = cocoon.parameters["rid"];
    var startRow = 0;
    var maxRows = 100;

     row = db.query("select * from report_parameter_map where report_id 
= ?", queryVal, startRow, maxRows);
     print (row.rowCount);

but get : "'Database' is not defined" ?

Is there a simpler way to query a given datasource from within a flow 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message