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.

Exception in com.sybase.tds.Tds.nextResult

2 posts in JDBC Connect (product renamed to JConnect) Last posting was on 1997-07-24 13:59:09.0Z
Todd Englund Posted on 1997-07-23 17:01:10.0Z
Message-ID: <33D638D5.9D727CA@sybase.com>
Date: Wed, 23 Jul 1997 11:01:10 -0600
From: Todd Englund <tenglund@sybase.com>
Reply-To: tenglund@sybase.com
X-Mailer: Mozilla 4.0 [en] (WinNT; I)
MIME-Version: 1.0
Subject: Exception in com.sybase.tds.Tds.nextResult
X-Priority: 3 (Normal)
Content-Type: multipart/mixed; boundary="------------AE6923069C4122A2775D06A6"
Newsgroups: sybase.public.jdbcconnect
Lines: 158
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:477
Article PK: 252229

I'm running into an exception when executing a DirectConnect command
that returns a result set that includes only a CS_MSG_RESULT and a
CS_STATUS_RESULT.

Isql executes the command correctly:

1> exec adm_start_service @name="SAMPLE_AS400_generic"
2> go
Msg 39907, Level 16, State 0:
Server 'crs183':
Service [SAMPLE_AS400_generic] was not started. It contains property
values
which are invalid. <ADM>
(return status = 1)

A simple jConnect program that executes the same command gives a
StringIndexOutOfBoundsException:

java.lang.StringIndexOutOfBoundsException: String index out of range: 5
at java.lang.String.substring(String.java:1046)
at com.sybase.tds.Tds.??(Unknown Source)
at com.sybase.tds.Tds.nextResult(Unknown Source)
at com.sybase.jdbc.ResultGetter.nextResult(ResultGetter.java)
at com.sybase.jdbc.SybStatement.nextResult(SybStatement.java)
at com.sybase.jdbc.SybStatement.queryLoop(SybStatement.java)
at com.sybase.jdbc.SybStatement.executeQuery(SybStatement.java)
at com.sybase.jdbc.SybStatement.executeQuery(SybStatement.java)
at AdminTest.main(AdminTest.java:76)

The environment I am using includes:
Windows NT 4.0
jConnect released July 16
JDK 1.1.3

Source code for the jConnect program is enclosed. The AdminTest class
uses the SampleUtils class that ships with jConnect.


Todd Englund
Sybase, Inc.


Lance Andersen Posted on 1997-07-24 13:59:09.0Z
Message-ID: <33D75FAD.E7@sybase.com>
Date: Thu, 24 Jul 1997 09:59:09 -0400
From: Lance Andersen <lancea@sybase.com>
X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m)
MIME-Version: 1.0
To: tenglund@sybase.com
Subject: Re: Exception in com.sybase.tds.Tds.nextResult
References: <33D638D5.9D727CA@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jdbcconnect
Lines: 57
Path: forums-1-dub!forums-master.sybase.com!forums.powersoft.com
Xref: forums-1-dub sybase.public.jdbcconnect:469
Article PK: 252221

Todd bug 134264 has been entered on this issue.

-Lance

Todd Englund wrote:
>
> I'm running into an exception when executing a DirectConnect command
> that returns a result set that includes only a CS_MSG_RESULT and a
> CS_STATUS_RESULT.
>
> Isql executes the command correctly:
>
> 1> exec adm_start_service @name="SAMPLE_AS400_generic"
> 2> go
> Msg 39907, Level 16, State 0:
> Server 'crs183':
> Service [SAMPLE_AS400_generic] was not started. It contains property
> values
> which are invalid. <ADM>
> (return status = 1)
>
> A simple jConnect program that executes the same command gives a
> StringIndexOutOfBoundsException:
>
> java.lang.StringIndexOutOfBoundsException: String index out of range: 5
> at java.lang.String.substring(String.java:1046)
> at com.sybase.tds.Tds.??(Unknown Source)
> at com.sybase.tds.Tds.nextResult(Unknown Source)
> at com.sybase.jdbc.ResultGetter.nextResult(ResultGetter.java)
> at com.sybase.jdbc.SybStatement.nextResult(SybStatement.java)
> at com.sybase.jdbc.SybStatement.queryLoop(SybStatement.java)
> at com.sybase.jdbc.SybStatement.executeQuery(SybStatement.java)
> at com.sybase.jdbc.SybStatement.executeQuery(SybStatement.java)
> at AdminTest.main(AdminTest.java:76)
>
> The environment I am using includes:
> Windows NT 4.0
> jConnect released July 16
> JDK 1.1.3
>
> Source code for the jConnect program is enclosed. The AdminTest class
> uses the SampleUtils class that ships with jConnect.
>
> Todd Englund
> Sybase, Inc.
>
> ---------------------------------------------------------------
>
> Name: AdminTest.java
> Part 1.2 Type: application/x-unknown-content-type-javafile
> Encoding: base64

--
===============================================================================
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!!!
===============================================================================