Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Operand type clash: TEXT is incompatible with IMAGE @ approx 20K

77 views
Skip to first unread message

Adam Jack

unread,
Nov 13, 2001, 7:18:45 PM11/13/01
to
> Clearly my mechanism is a tad lame, I am doubling (at mimimum) my in
memory
> usage by constructing an String SQL statement, but then I went w/ SQL 'cos
> stored procedure was
>
.... stored procedure was not an option over 32K. I have lots of memory, but
no knowledge of a better way to do this w/ JDBC...

Adam


Adam Jack

unread,
Nov 13, 2001, 3:09:03 PM11/13/01
to
Forgive me if this is a basic "I want to use large data w/ JDBC" question
but I am using jConenct 5.5 and ASE 12.5 GA and I am attempting an INSERT
statement with one column a binary. I construct an SQL statement and have my
data at the end, something like:

INSERT INTO XYZ (BigUn) VALUES ('XXX.........')

Around 20K this stops working and I get the error below. Can somebody
explain that to me?

I tried going a Blob route -- but that appears for references of large data
inside a database, not a way for getting that data into there in the first
place.

Clearly my mechanism is a tad lame, I am doubling (at mimimum) my in memory
usage by constructing an String SQL statement, but then I went w/ SQL 'cos
stored procedure was

Is there a way I ought be doing this in JDBC? If not is there a way I
ought/could be doing this w/ jConnect? [I don't mind being jConnect
specific.]

BTW: I only really need about 100K --- I've set that as a limit (the 20K
just hit me by surprize and isn't quite enough.)

regards,

Adam

com.sybase.jdbc2.jdbc.SybSQLException: Operand type clash: TEXT is
incompatible with IMAGE

at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2415)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1851)
at
com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
at
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
at
com.sybase.jdbc2.jdbc.SybStatement.updateLoop(SybStatement.java:1479)
at
com.sybase.jdbc2.jdbc.SybStatement.executeUpdate(SybStatement.java:1462)
at
com.sybase.jdbc2.jdbc.SybPreparedStatement.executeUpdate(SybPreparedStatemen
t.java:88)


Jim Egan

unread,
Nov 13, 2001, 10:54:43 PM11/13/01
to
aj...@sybase.com wrote...

See the TextPointer class in com.sybase.jdbcx.
--
Jim Egan [TeamSybase]
Senior Consultant
Sybase Professional Services

support

unread,
Nov 14, 2001, 11:48:09 AM11/14/01
to

> > > Clearly my mechanism is a tad lame, I am doubling (at mimimum) my in
> > memory
> > > usage by constructing an String SQL statement, but then I went w/ SQL
'cos
> > > stored procedure was
> > >
> > .... stored procedure was not an option over 32K. I have lots of memory,
but
> > no knowledge of a better way to do this w/ JDBC...
>
> See the TextPointer class in com.sybase.jdbcx.

Is this my only option? Our DBA here says that will (1) slow us down [more
IOs] and (2) be awkward w/ transaction boundaries [already confusing enough
inside EAS w/ EJBs and Java w/ the ANSI implicit begin.

Is this a know limit, or a known problem? Is TextPointer the only option?

Thanks in advance.

regards,

Adam


Jim Egan

unread,
Nov 14, 2001, 11:18:18 PM11/14/01
to
aj...@openbiz.biz wrote...

I can't answer your questions. I've just started using jConnect. But, AFAIK the
TextPointer is the way to go.

Adam Jack

unread,
Nov 18, 2001, 12:42:56 PM11/18/01
to
> > > See the TextPointer class in com.sybase.jdbcx.
>

I ended up hexencoding 0xXXX not 'YYY' my data, and this worked. Explicit
converts failed. I've entered a bug report on this, in case this 20K is not
a designed in limit.

Adam


0 new messages