John,
I actually have a very simple criteria.
I have a table called user, with a primary key of user_id.
My criteria is simply criteria.add(UserPeerR.USER_ID,<integer value>) ;
Then I do a UserPeer.doPSSelect(criteria,conn) ;
that is all I am doing.
also on the code that is missing, if you have a list of stuff missing, then
I would gladly volunteer for making those changes, and submitting as a patch.
thanks, -subhash.
--- John McNally <[EMAIL PROTECTED]> wrote:
> I recently took a quick look at doPSSelect and it appears to be missing
> quite a bit of needed code. It only accounts for dates and treats all
> other values as strings. Maybe this approach works in some drivers but
> not all? Maybe it works in all of them, but I would think there could
> be problems. Accounting for possibly null values is something else I
> found lacking, though I am not completely clear on how they are handled
> in PreparedStatements.
>
> If you have
>
> column1 = ? in a prepared statement and you use
> ps.setNull(1, Types.SOMETYPE)
>
> is that expected to match all rows with null values for column1?
>
> I ask because in other sql you have to use the IS NULL special form.
>
> Anyway, null values will not be handled well using doPSSelect.
>
> john mcnally
>
> On Wed, 2002-06-05 at 12:38, Subhash wrote:
> > Are there any issues with prepared statments and the oracle driver?.
> >
> > I am doing a BasePeer.doPSSelect() and am getting an exception:
> >
> > I am running off of the HEAD version in CVS.
> >
> > and also I am passing the Connection to the PSSelect statement.
> >
> > Thanks in advance. -Subhash.
> >
> > java.sql.SQLException: ORA-00936: missing expression
> > at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
> > at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
> > at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
> > at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
> > at
> oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
> > at
> oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1674)
> > at
> >
>
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)
> > at
> >
>
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
> > at
> >
>
oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:314)
> > at org.apache.torque.util.BasePeer.doPSSelect(BasePeer.java:2180)
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>