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.

Return resultset from PB component to dynascript?

3 posts in General Discussion (old) Last posting was on 2000-03-01 20:15:48.0Z
Tim Nesham Posted on 2000-03-01 16:35:33.0Z
Newsgroups: sybase.public.easerver
From: "Tim Nesham" <tim.nesham@born.com>
Subject: Return resultset from PB component to dynascript?
Date: Wed, 1 Mar 2000 10:35:33 -0600
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Original-NNTP-Posting-Host: 161.49.6.89
Organization: Quad/Graphics,Inc.
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38bd46d9@news.qgraph.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.6.89
Xref: forums-1-dub sybase.public.easerver:27421
Article PK: 158820

How do I use the resultset object returned from a PB component in server
side script?

I don't want to use the MASP control because I want to use the connection
cache and I see no way to combine the two.


TIA,

Tim


Jim O'Neil [Sybase] Posted on 2000-03-01 19:00:32.0Z
Newsgroups: sybase.public.easerver
Date: Wed, 01 Mar 2000 14:00:32 -0500
From: "Jim O'Neil [Sybase]" <joneil@sybase.com>
Organization: Sybase, Inc.
X-Mailer: Mozilla 4.7 [en]C-CCK-MCD (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Return resultset from PB component to dynascript?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 32
NNTP-Posting-Host: joneil-nt.sybase.com 204.167.42.111
Message-ID: <347_38BD68D0.FB72C159@sybase.com>
References: <347_38bd46d9@news.qgraph.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.easerver:27412
Article PK: 158815


Tim Nesham wrote:

> How do I use the resultset object returned from a PB component in server
> side script?
>
> I don't want to use the MASP control because I want to use the connection
> cache and I see no way to combine the two.
>
> TIA,
>
> Tim

Use the Java query object and functions provided in javaqry.ssc. Here's some
sample script:

<!--SCRIPT
import ~/javaqry.ssc;
Object testrs = java.CreateComponent("test/n_oracle",
"iiop://localhost:9000", "jagadmin","");

resSet = testrs.accessdb("O73","Oracle7","JAG_CM_FORCE");

query = new JavaQuery(resSet);
if (query.GetColumnCount() == 0) {
document.writeln("QUERY FAILED");
}

document.writeln('<TABLE ALIGN=CENTER BORDER=1 CELLPADDING=5>');
while(query.MoveNext())

document.writeln('<tr><td>'+query.GetValue(1)+'</td><td>'+query.GetValue(2)+'</td><td>'+query.GetValue(3)+'</td></tr>');

document.writeln('</TABLE>');

-->


testrs is a PowerBuilder component and accessdb is a method than connects to
the desired cache, does a select into a datastore, converts it to a
PowerBuilder ResultSet and returns it into the Dynamo variable resSet.

--
Jim O'Neil
Senior Technical Support Engineer
Sybase, Inc


Tim Nesham Posted on 2000-03-01 20:15:48.0Z
Newsgroups: sybase.public.easerver
From: "Tim Nesham" <tim.nesham@born.com>
Subject: Re: Return resultset from PB component to dynascript?
Date: Wed, 1 Mar 2000 14:15:48 -0600
Lines: 58
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Original-NNTP-Posting-Host: 161.49.6.89
Organization: Quad/Graphics,Inc.
NNTP-Posting-Host: dns2.qgraph.com 206.158.124.2
Message-ID: <347_38bd7a78@news.qgraph.com>
References: <347_38bd46d9@news.qgraph.com> <347_38BD68D0.FB72C159@sybase.com>
Path: forums-1-dub!forums-1-dub!forums-master.sybase.com!forums.sybase.com!news.qgraph.com!161.49.6.89
Xref: forums-1-dub sybase.public.easerver:27401
Article PK: 158806

Thanks. Just in time! Much appreciated.

"Jim O'Neil [Sybase]" <joneil@sybase.com> wrote in message
news:38BD68D0.FB72C159@sybase.com...
> Tim Nesham wrote:
>
> > How do I use the resultset object returned from a PB component in server
> > side script?
> >
> > I don't want to use the MASP control because I want to use the
connection
> > cache and I see no way to combine the two.
> >
> > TIA,
> >
> > Tim
>
> Use the Java query object and functions provided in javaqry.ssc. Here's
some
> sample script:
>
> <!--SCRIPT
> import ~/javaqry.ssc;
> Object testrs = java.CreateComponent("test/n_oracle",
> "iiop://localhost:9000", "jagadmin","");
>
> resSet = testrs.accessdb("O73","Oracle7","JAG_CM_FORCE");
>
> query = new JavaQuery(resSet);
> if (query.GetColumnCount() == 0) {
> document.writeln("QUERY FAILED");
> }
>
> document.writeln('<TABLE ALIGN=CENTER BORDER=1 CELLPADDING=5>');
> while(query.MoveNext())
>
>

document.writeln('<tr><td>'+query.GetValue(1)+'</td><td>'+query.GetValue(2)+
'</td><td>'+query.GetValue(3)+'</td></tr>');
>
> document.writeln('</TABLE>');
>
> -->
>
>
> testrs is a PowerBuilder component and accessdb is a method than connects
to
> the desired cache, does a select into a datastore, converts it to a
> PowerBuilder ResultSet and returns it into the Dynamo variable resSet.
>
> --
> Jim O'Neil
> Senior Technical Support Engineer
> Sybase, Inc
>
>