Make your own free website on Tripod.com

InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: Prepared stament exception


Thanks for reporting this Ahmet.

This is a known bug and will be fixed in the next release. It happens when a
PreparedStatement parameter changes from null to a non-null value near to
the end of a statement.

If it's possible to arrange, either for these transitions to occur at the
start of a statement, or to use different PreparedStatements for the null
and non-null variants, then this will probably provide the basis of a
temporary workaround.

Regards

Pete

--

Peter Hearty                         peter.hearty@lutris.com
Lutris Technologies (UK)        http://www.lutris.com
----- Original Message -----
From: "ahmet basaran" <ahmet_basaran@hotmail.com>
To: <instantDB@enhydra.org>
Sent: Thursday, January 18, 2001 7:21 AM
Subject: InstantDB: Prepared stament exception


> I am using instandDB 3.25 on a Windows NT 4.0 platform. I developed a
> multithreaded application that each thread has its own db connection to
> update the same table.
>
> I want to use the following prepared statement to update the table.
>
> sql = "UPDATE INBOX SET INTGR_STATE = ?, INTGR_TIME = ?, INTGR_RETRY  = ?,
> INTGR_MSG = ? WHERE MSGID = " + msgId;
> prep = con.prepareStatement(sql);
>
> When I set the 4 th paramater null it works fine.
>
> prep.setInt(1,2);
> prep.setObject(2,null);
> prep.setInt(3,0);
> prep.setString(4,null);
> prep.execute();
>
> But if I set this param with a string, I get the following Exception.
>
> prep.setInt(1,2);
> prep.setObject(2,null);
> prep.setInt(3,0);
> prep.setString(4,"Successful");
> prep.execute();
>
> java.lang.ArrayIndexOutOfBoundsException: 90 >= 90
>         at java.util.Vector.elementAt(Vector.java:417)
>         at
> org.enhydra.instantdb.db.matchedTokens.getObject(matchedTokens.java:2
> 16)
>         at
> org.enhydra.instantdb.db.matchedTokens.get(matchedTokens.java:289)
>         at
> org.enhydra.instantdb.db.matchedTokens.get(matchedTokens.java:312)
>         at
> org.enhydra.instantdb.db.expression.constructExpr(expression.java:669
> )
>         at org.enhydra.instantdb.db.expression.<init>(expression.java:756)
>         at
org.enhydra.instantdb.db.SQLProg.compile_update(SQLProg.java:773)
>         at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:227)
>         at
> org.enhydra.instantdb.jdbc.idbPreparedStatement.execute(idbPreparedSt
> atement.java:92)
>         at MdiAdapObject.integrateSingleMsg(MdiAdapObject.java:321)
>         at MdiAdapObject.batchIntegrate(MdiAdapObject.java:274)
>         at MdiAdapObject.TimerEvent(MdiAdapObject.java:102)
>         at com.marti.util.MartiTimer.run(MartiTimer.java:83)
>
> I tried setObject instead of setString but it is useless too.
>
> I need help and thank you in advance..
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> --------------------------------------------------------------------------
---
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>


-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe instantdb" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-instantdb@enhydra.org.