Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

jConnect 2.1, SQL Anywhere, LONG BINARY and setBytes(null)

3 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-05-21 16:20:50.0Z
Tom Zepf Posted on 1997-05-07 23:34:44.0Z
Message-ID: <33711194.121041F1@channelpoint.com>
Date: Wed, 07 May 1997 17:34:44 -0600
From: Tom Zepf <tjz@channelpoint.com>
X-Mailer: Mozilla 4.0b4 [en] (WinNT; I)
MIME-Version: 1.0
Subject: jConnect 2.1, SQL Anywhere, LONG BINARY and setBytes(null)
X-Priority: 3 (Normal)
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 13
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:862
Article PK: 252614

Using a PreparedStatement to set columns of type LONG BINARY
with setBytes() kills the gateway when trying to set a column
to NULL with setBytes(null).

Zero-length byte arrays crash it as well.

So does an empty InputStream and setBinaryStream().

setNull(column, jdbc.sql.Types.LONGVARBINARY) complains
about unable to convert some unprintable character to int or such.

Is there anyway to set these columns to NULL in a PreparedStatement?

Thanks,

Tom Zepf


David Clegg Posted on 1997-05-21 16:20:50.0Z
Message-ID: <338320E2.3A8E81AB@sybase.com>
Date: Wed, 21 May 1997 09:20:50 -0700
From: David Clegg <davec@sybase.com>
X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i586)
MIME-Version: 1.0
To: Tom Zepf <tjz@channelpoint.com>
Subject: Re: jConnect 2.1, SQL Anywhere, LONG BINARY and setBytes(null)
References: <33711194.121041F1@channelpoint.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 17
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:801
Article PK: 252552

The latest version of the jConnect driver (pushed out to www.sybase.com
yesterday 5/20) has the fix for these NULL LONGBINARY parameters.

dave

>
> Using a PreparedStatement to set columns of type LONG BINARY
> with setBytes() kills the gateway when trying to set a column
> to NULL with setBytes(null).
>
> Zero-length byte arrays crash it as well.
>
> So does an empty InputStream and setBinaryStream().
>
> setNull(column, jdbc.sql.Types.LONGVARBINARY) complains
> about unable to convert some unprintable character to int or such.
>
> Is there anyway to set these columns to NULL in a PreparedStatement?
>
> Thanks,
>
> Tom Zepf


Lance Andersen Posted on 1997-05-13 13:11:03.0Z
Message-ID: <33786867.1151@sybase.com>
Date: Tue, 13 May 1997 09:11:03 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
To: Tom Zepf <tjz@channelpoint.com>
Subject: Re: jConnect 2.1, SQL Anywhere, LONG BINARY and setBytes(null)
References: <33711194.121041F1@channelpoint.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 34
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:838
Article PK: 252590

Hi Tom,

The next version of SQL Anywhere 5.5.0.2 which is due out
shortly will address this in a more user friendly manner.

I tested this yesterday on the latest development version.

We are also in the process of completing a change in our driver
which will also aleviate the problem on both the SQL Server and
SQL Anywhere sides of the house.

-Lance

Tom Zepf wrote:
>
> Using a PreparedStatement to set columns of type LONG BINARY
> with setBytes() kills the gateway when trying to set a column
> to NULL with setBytes(null).
>
> Zero-length byte arrays crash it as well.
>
> So does an empty InputStream and setBinaryStream().
>
> setNull(column, jdbc.sql.Types.LONGVARBINARY) complains
> about unable to convert some unprintable character to int or such.
>
> Is there anyway to set these columns to NULL in a PreparedStatement?
>
> Thanks,
>
> Tom Zepf

--
===============================================================================
Lance J. Andersen Email: lancea@sybase.com
Sybase Technical Support Phone:(617) 564-6336
77 South Bedford Street Fax: (617) 564-6148
Burlington, MA 01803

The Dark Knight Returns!!! Let's Go Penguins!!!
===============================================================================