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]

InstantDB: Problem with Prepared statements in 3.26



Hi,

Running Beta 2 of 3.26, I'm getting this traceback from some of my prepared
statements:

insert into TNSONETPATH (
EQUIPID,NEID,CREATIONDATE,LASTUPDATED,STATUS,IFINDEX,SUBIFINDEX,SLOTINDEX,PO
RTINDEX,CHANNELINDEX,PATHADMINSTATUS,PATHOPERSTATUS,PATHMTU,PATHMRU,PATHFORW
ARDINGMODE,PATHLINKUPDOWNTRAPENABLE,PATHALIAS,PATHSIGNALID,PATHTRACE,PATHCHA
NNELWIDTH ) values ( 10000000772,10000000110,'2001-02-12
20:26:27','2001-02-12 20:26:27',0,10,6,3,1,1,1,1,4470,4470,2,2,'',22,?,48 )
[02/12/01 08:26:27]
DeviceUtilRule::sizeDevice(): Failed to retreive Topic
tenor.server.device.topic.TopicCommSonetPath
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.String.charAt(String.java:506)
        at org.enhydra.instantdb.db.tokenList.getSQL(tokenList.java:416)
        at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:195)
        at
org.enhydra.instantdb.jdbc.idbPreparedStatement.execute(idbPreparedStatement
.java:92)
        at
org.enhydra.instantdb.jdbc.idbPreparedStatement.executeUpdate(idbPreparedSta
tement.java:71)
        at tenor.api.database.Tnsonetpath.insert(Tnsonetpath.java:1132)
        at tenor.api.device.equip.Equipment.createInDb(Equipment.java:848)
        at
tenor.server.device.topic.TopicCommBase.updateAttrVectorInDb(TopicCommBase.j
ava:204)
        at
tenor.server.device.topic.TopicCommGenVector.updateTopicInDb(TopicCommGenVec
tor.java:263)


The workaround is not to mix prepared statements and empty strings (ie '').
Running the same sql directive without a prepared statement works fine, the
empty string is accepted.

Thanks for any tips,

- Ko


========================================
Ko Baryiames
Network Engineer
Tenor Networks 
100 Nagog Park
Acton, MA 01720
(978)264-4900 x157 
http://www.tenornetworks.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.