Does the ps sql look the same for the previous versions and the current
version?
john mcnally
On Wed, 2002-06-05 at 16:28, Subhash wrote:
> John,
> tried both, the setInt as well as the removal of the NumberKey check..
>
> the doPSSelect used to work in 3.0b1 for sure and I think in b2 too..
>
> but the patch that you had provided was exactly the removal of the changes
> that are done in 3.0 b3..
>
> is there any thing more that I can do to provide you with more debug
> information?..
>
> thanks again, -subhash.
>
> --- John McNally <[EMAIL PROTECTED]> wrote:
> > Try this (sorry for the line wrap, i need to figure out how to stop that
> > in Evolution).
> >
> > Index: BasePeer.java
> > ===================================================================
> > RCS file:
> >
> /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/util/BasePeer.java,v
> > retrieving revision 1.40
> > diff -u -u -r1.40 BasePeer.java
> > --- BasePeer.java 20 May 2002 18:45:55 -0000 1.40
> > +++ BasePeer.java 5 Jun 2002 22:51:27 -0000
> > @@ -2200,6 +2200,10 @@
> > {
> > stmt.setDate(i + 1, (java.sql.Date) param);
> > }
> > + else if (param instanceof NumberKey)
> > + {
> > + stmt.setBigDecimal(i+1,
> > (NumberKey)param).getBigDecimal());
> > + }
> > else
> > {
> > stmt.setString(i + 1, param.toString());
> >
> > If that does not work, try converting to an int and using stmt.setInt.
> > Let me know how it goes.
> >
> > john mcnally
> >
> >
> > On Wed, 2002-06-05 at 14:35, Subhash wrote:
> > > 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]>
> > >
> >
> >
> >
> > --
> > 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]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>