db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Le Berrigaud <sleber...@dexem.com>
Subject Pb with executeQuery
Date Wed, 14 May 2003 12:22:32 GMT

here is my problem:

I need for some matter to execute a query thanks to the executeQuery 
method of org.apache.torque.util.BasePeer. But when I first test it an 
error occur saying that I have no DataSourceFactory configured for my 
database... The fact is that in the same method I succeded in performing 
a doSelect ( which also needs the DataSourceFactory as far as I know).

Here is the code...

        List list = ContactPeer.doSelectAll(); // that is the doSelect 
that works

        Criteria criteria = new Criteria();
        criteria.add(ContactPeer.CONTACT_ID, 1);      
        String query = ContactPeer.createQueryString(criteria);
        ContactPeer.executeQuery(query); // that is the simple query I 
wanted to test...

I don't know where the pb comes from ! Does someone have an idea ?



View raw message