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.

Problems retrieving a Resultset

2 posts in JConnect version 3.0 Last posting was on 2001-01-04 17:41:00.0Z
David_Xicota Posted on 2001-01-04 15:54:07.0Z
From: David_Xicota
Date: Thu, 4 Jan 2001 10:54:07 -0500
Newsgroups: sybase.public.jconnect30
Subject: Problems retrieving a Resultset
Message-ID: <0EC12CBAF6DDB4D300575A20852569CA.00575A2E852569CA@webforums>
Lines: 20
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.jconnect30:201
Article PK: 255683

Hi,

We are using JAVA & jConnect52. We have some Stored procedures in the
Database with the following structure:
@var1 = select <whatever> FROM ....
@var2 = select <whatever> FROM ....

/* the expected returned select is */
select @var1, @var2, <whatever> FROM ....

The problem is that instead of returning a Resultset with the fields
"@var1, @var2, <whatever>" we are not able to instantiate a Resultset.

The last chance is creating the Sproc as just one select, but the
resulting code would be too much complicated to follow for the rest of
developers.

Does anyone know what the problem maybe?

Thanks
David


Kevin J. Grittner Posted on 2001-01-04 17:41:00.0Z
Message-ID: <3A54B5AC.6F545A8D@chorus.net>
Date: Thu, 04 Jan 2001 11:41:00 -0600
From: "Kevin J. Grittner" <kjgrittn@chorus.net>
Organization: Consultant
X-Mailer: Mozilla 4.72 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Problems retrieving a Resultset
References: <0EC12CBAF6DDB4D300575A20852569CA.00575A2E852569CA@webforums>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.jconnect30
Lines: 26
NNTP-Posting-Host: 165.219.95.135
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.jconnect30:200
Article PK: 254560

David,

You're getting row counts in the response stream ahead of the result
set. You need to set up a loop to process the entire response stream.
Look at the examples that came with jConnect to find examples of the
technique.

-Kevin

David_Xicota wrote:
>
> Hi,
>
> We are using JAVA & jConnect52. We have some Stored procedures in the
> Database with the following structure:
> @var1 = select <whatever> FROM ....
> @var2 = select <whatever> FROM ....
>
> /* the expected returned select is */
> select @var1, @var2, <whatever> FROM ....
>
> The problem is that instead of returning a Resultset with the fields
> "@var1, @var2, <whatever>" we are not able to instantiate a Resultset.
>
> The last chance is creating the Sproc as just one select, but the
> resulting code would be too much complicated to follow for the rest of
> developers.
>
> Does anyone know what the problem maybe?
>
> Thanks
> David