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.

Stored Proc as Data Source Not Working

6 posts in DataWindow Last posting was on 2008-09-18 21:41:11.0Z
Jim Posted on 2008-09-17 21:47:07.0Z
Sender: 59dc.48d1778e.1804289383@sybase.com
From: Jim
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Stored Proc as Data Source Not Working
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48d17adb.5a5a.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 17 Sep 2008 14:47:07 -0700
X-Trace: forums-1-dub 1221688027 10.22.241.41 (17 Sep 2008 14:47:07 -0700)
X-Original-Trace: 17 Sep 2008 14:47:07 -0700, 10.22.241.41
Lines: 20
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87787
Article PK: 417042

I wanted to use a stored procedure (MSQL 2005) as a data
source for a new window that I'm creating.

My first attempt was using a stored procedure that creates a
temporary table, populates it, and then returns the result
set. This stored procedure accepted two arguements. It
worked okay in the preview of the datawindow, but when
hooked to a window and run I get an error message, "Select
Error: Requested result set number 1 not found."

So next I thought I'd create a very simple stored procedure
with no arguements and return first and last name from a
permanent table. Created a new datawindow with this stored
procedure and got the exact same error message.

I'm quite new to PowerBuiler (using v11.2) and not sure what
the problem is and what to do to resolve the issue.

Any help is greatly appreciated and my thanks in advance.
Jim


Paul Horan[TeamSybase] Posted on 2008-09-17 21:57:53.0Z
From: "Paul Horan[TeamSybase]" <phoran_nospam@sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48d17adb.5a5a.1681692777@sybase.com>
Subject: Re: Stored Proc as Data Source Not Working
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48d17d61$1@forums-1-dub>
Date: 17 Sep 2008 14:57:53 -0700
X-Trace: forums-1-dub 1221688673 10.22.241.152 (17 Sep 2008 14:57:53 -0700)
X-Original-Trace: 17 Sep 2008 14:57:53 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87788
Article PK: 417043

That message means that the procedure ended before it got to the SELECT
statement that prepares the result set.

Take a look at the code, and see if there are any places that the proc could
prematurely exit from.

Paul Horan[Sybase]

<Jim> wrote in message news:48d17adb.5a5a.1681692777@sybase.com...
>I wanted to use a stored procedure (MSQL 2005) as a data
> source for a new window that I'm creating.
>
> My first attempt was using a stored procedure that creates a
> temporary table, populates it, and then returns the result
> set. This stored procedure accepted two arguements. It
> worked okay in the preview of the datawindow, but when
> hooked to a window and run I get an error message, "Select
> Error: Requested result set number 1 not found."
>
> So next I thought I'd create a very simple stored procedure
> with no arguements and return first and last name from a
> permanent table. Created a new datawindow with this stored
> procedure and got the exact same error message.
>
> I'm quite new to PowerBuiler (using v11.2) and not sure what
> the problem is and what to do to resolve the issue.
>
> Any help is greatly appreciated and my thanks in advance.
> Jim


Jim Posted on 2008-09-18 14:21:56.0Z
Sender: 59dc.48d1778e.1804289383@sybase.com
From: Jim
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Stored Proc as Data Source Not Working
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48d26404.74b0.1681692777@sybase.com>
References: <48d17d61$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 18 Sep 2008 07:21:56 -0700
X-Trace: forums-1-dub 1221747716 10.22.241.41 (18 Sep 2008 07:21:56 -0700)
X-Original-Trace: 18 Sep 2008 07:21:56 -0700, 10.22.241.41
Lines: 44
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87792
Article PK: 417046

Yes. I did a bit of searching before I posted this question
and found out that this could cause a problem.

However, in the second stored procedure that I tried I
wanted to make things as simple as possible so the only line
in that procedure is the 'select lname, fname from users'.
There is no chance for a premature exit.

So I'm not sure what else to look for?

> That message means that the procedure ended before it got
> to the SELECT statement that prepares the result set.
>
> Take a look at the code, and see if there are any places
> that the proc could prematurely exit from.
>
> Paul Horan[Sybase]
>
> <Jim> wrote in message
> news:48d17adb.5a5a.1681692777@sybase.com... >I wanted to
> > use a stored procedure (MSQL 2005) as a data source for
> a new window that I'm creating. >
> > My first attempt was using a stored procedure that
> > creates a temporary table, populates it, and then
> > returns the result set. This stored procedure accepted
> > two arguements. It worked okay in the preview of the
> > datawindow, but when hooked to a window and run I get an
> > error message, "Select Error: Requested result set
> number 1 not found." >
> > So next I thought I'd create a very simple stored
> > procedure with no arguements and return first and last
> > name from a permanent table. Created a new datawindow
> > with this stored procedure and got the exact same error
> message. >
> > I'm quite new to PowerBuiler (using v11.2) and not sure
> > what the problem is and what to do to resolve the issue.
> >
> > Any help is greatly appreciated and my thanks in
> > advance. Jim
>
>


Scott Morris Posted on 2008-09-18 15:00:20.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48d17d61$1@forums-1-dub> <48d26404.74b0.1681692777@sybase.com>
Subject: Re: Stored Proc as Data Source Not Working
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48d26d04$1@forums-1-dub>
Date: 18 Sep 2008 08:00:20 -0700
X-Trace: forums-1-dub 1221750020 10.22.241.152 (18 Sep 2008 08:00:20 -0700)
X-Original-Trace: 18 Sep 2008 08:00:20 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87794
Article PK: 417048


<Jim> wrote in message news:48d26404.74b0.1681692777@sybase.com...
> Yes. I did a bit of searching before I posted this question
> and found out that this could cause a problem.
>
> However, in the second stored procedure that I tried I
> wanted to make things as simple as possible so the only line
> in that procedure is the 'select lname, fname from users'.
> There is no chance for a premature exit.
>
> So I'm not sure what else to look for?

Turn profiler on and look at the queries actually executed by PB. You might
want to post the details of your db connection. I'm having no problem using
SNC or OLE with 2005. Since 11.2 is an upgrade from 11, you might want to
verify that your system does not have a mixture of PB DLLs from any prior
build. Another possibility is that you need to fully qualify your object
names (i.e, "select ... from dbo.users ..." within the procedure).


Scott Morris Posted on 2008-09-18 15:25:03.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <48d17d61$1@forums-1-dub> <48d26404.74b0.1681692777@sybase.com> <48d26d04$1@forums-1-dub>
Subject: Re: Stored Proc as Data Source Not Working
Lines: 6
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <48d272cf@forums-1-dub>
Date: 18 Sep 2008 08:25:03 -0700
X-Trace: forums-1-dub 1221751503 10.22.241.152 (18 Sep 2008 08:25:03 -0700)
X-Original-Trace: 18 Sep 2008 08:25:03 -0700, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87796
Article PK: 417050

> Turn profiler on and look at the queries actually executed by PB.

I should elaborate. There may be some sort of error occuring during the
procedure interrogation process that PB is hiding.


Jim Posted on 2008-09-18 21:41:11.0Z
Sender: 59dc.48d1778e.1804289383@sybase.com
From: Jim
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: Stored Proc as Data Source Not Working
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <48d2caf7.2bb.1681692777@sybase.com>
References: <48d26d04$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 18 Sep 2008 14:41:11 -0700
X-Trace: forums-1-dub 1221774071 10.22.241.41 (18 Sep 2008 14:41:11 -0700)
X-Original-Trace: 18 Sep 2008 14:41:11 -0700, 10.22.241.41
Lines: 27
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:87802
Article PK: 417058


> <Jim> wrote in message
> > news:48d26404.74b0.1681692777@sybase.com... Yes. I did a
> > bit of searching before I posted this question and found
> out that this could cause a problem. >
> > However, in the second stored procedure that I tried I
> > wanted to make things as simple as possible so the only
> > line in that procedure is the 'select lname, fname from
> > users'. There is no chance for a premature exit.
> >
> > So I'm not sure what else to look for?
>
> Turn profiler on and look at the queries actually executed
> by PB. You might want to post the details of your db
> connection. I'm having no problem using SNC or OLE with
> 2005. Since 11.2 is an upgrade from 11, you might want to
> verify that your system does not have a mixture of PB DLLs
> from any prior build. Another possibility is that you
> need to fully qualify your object names (i.e, "select ...
> from dbo.users ..." within the procedure).
>
>

I checked the DLL and that was the problem. Everything
magically starting working.

Thanks a lot for the help. Now I can get on with the real
work again!!