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: longvarbinary column in where clause


Hi Peter,

I'm sorry I don't know the script syntax.  But here's the case I was trying:
When the values are inserted, insert a java.lang.Double(10)  instead of a double

When specifying the where clause, you will need to use a prepared statement and
call setObject (1, new java.lang.Double(10)) before executing it.

So the question is, should the above scenario work -- a table has Java objects
in its columns and I want to select out some based on the value of another Java
object. If the BLOBs are saved as Java byte[], then I think comparing for
equality should be fairly straightforward.  You already allow for creating
indices on binary columns (which, incidentally is a very nice feature) so the
code must be able to compare binary columns.  Well, that's conjecture.

Hope this gives you more information and I will read-up on the script syntax.
It seems quite nice.

Vidur

Peter Hearty wrote:

> Vidur
>
> With InstantDB you can't compare a double value against a binary value.
> InstantDB knows very little about the structure of binary data. It
> essentially classifies it as a string, a Java object, or as anything else.
> In the case of "anything else" it doesn't know whether its a number, an
> image or whatever, so it doesn't know how to perform the compare.
>
> I couldn't reproduce exactly the same exception though. Maybe you could
> alter the attached script to bring it closer to what you're trying to do?
>
> Regards
>
> Peter Hearty
> Lutris Technologies UK Ltd.
> -----Original Message-----
> From: Vidur Dhanda <vdhanda@active-solutions-inc.com>
> To: instantDB <instantDB@enhydra.org>
> Date: 04 July 2000 21:09
> Subject: InstantDB: longvarbinary column in where clause
>
> >Hello,
> >
> >Is it possible to test for equality on a longvarbinary column.  When I
> >use a prepared statement -- select * from A where longvarbinarycolumnB =
> >an instance of a Double,  I get an exception:
> >java.sql.SQLException: java.lang.Double
> > at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:276)
> > at
> >org.enhydra.instantdb.jdbc.idbPreparedStatement.execute(idbPreparedStatemen
> t.java:92)
> >
> > at
> >org.enhydra.instantdb.jdbc.idbPreparedStatement.executeQuery(idbPreparedSta
> tement.java:59)
> >
> >Thanks,
> >Vidur
> >
> >---------------------------------------------------------------------------
> --
> >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.
> >
>
>   ------------------------------------------------------------------------
>               Name: tmp.txt
>    tmp.txt    Type: Plain Text (text/plain)
>           Encoding: 7bit



-----------------------------------------------------------------------------
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.