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.

building a dw off of a stored proc -- errors out

3 posts in DataWindow Last posting was on 2008-11-25 15:01:59.0Z
TonyMIS Posted on 2008-11-24 20:16:18.0Z
From: TonyMIS <aesteves@bostonfinancial.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: building a dw off of a stored proc -- errors out
Date: Mon, 24 Nov 2008 12:16:18 -0800 (PST)
Organization: http://groups.google.com
Lines: 28
Message-ID: <e02c0ca0-22f5-4f2a-a7e0-da9dea712376@x8g2000yqk.googlegroups.com>
NNTP-Posting-Host: 209.0.112.9
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1227557778 17367 127.0.0.1 (24 Nov 2008 20:16:18 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 24 Nov 2008 20:16:18 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: x8g2000yqk.googlegroups.com; posting-host=209.0.112.9; posting-account=XF6ckgoAAACs7hQvjds3XT2_H3YZR6k7
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; InfoPath.1),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!x8g2000yqk.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88235
Article PK: 417489

Hello
pb 10 build 4410 MSsqlServer 8.00.194

I built a stored proc with three varchar parameters.

Tested it (in Query Analyzer) and it works fine. The stored proc
itself is one that declares three varchar parameters

I then went to build a datawindow (freeform) off of this stored proc
and
a message comes up, right after I select the stored proc, that reads

'Cannot Create Datawindow'

SQL State = 34000
microsoft odbc SQL Server Driver [SQL Server} A cursor with the
name 'SEC_HIER_CUR'
does not exist.

execute dbo.sp_cs_heir;1 @vp_id=:vp_id,
@off_id=:off_id,@mgr_id=:mgr_id

There is nothing wrong with the Cursor, so why is this happening?

Anyhelp would be greatly appreciated.

Thanks
Tony


Paul Horan[Sybase] Posted on 2008-11-25 05:05:53.0Z
From: "Paul Horan[Sybase]" <phoran_nospam@sybase.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <e02c0ca0-22f5-4f2a-a7e0-da9dea712376@x8g2000yqk.googlegroups.com>
Subject: Re: building a dw off of a stored proc -- errors out
Lines: 47
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <492b87b1@forums-1-dub>
Date: 24 Nov 2008 21:05:53 -0800
X-Trace: forums-1-dub 1227589553 10.22.241.152 (24 Nov 2008 21:05:53 -0800)
X-Original-Trace: 24 Nov 2008 21:05:53 -0800, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88236
Article PK: 417490

When you create a datawindow from a stored procedure, PB will actually
invoke the proc with NULL values in the parameters, so that it can
introspect the result set that comes back and paint the proper column
names/types into the datawindow definition.

If that causes your proc to error out (or prematurely exit) before the final
select statement, you'll get strange messages like this.
Here's what to try:
- Comment out everything in the proc except the declaration and the final
SELECT statement and save it.
- Paint the datawindow against the proc.
- Uncomment the proc and save it.

Paul Horan[Sybase]

"TonyMIS" <aesteves@bostonfinancial.com> wrote in message
news:e02c0ca0-22f5-4f2a-a7e0-da9dea712376@x8g2000yqk.googlegroups.com...
> Hello
> pb 10 build 4410 MSsqlServer 8.00.194
>
> I built a stored proc with three varchar parameters.
>
> Tested it (in Query Analyzer) and it works fine. The stored proc
> itself is one that declares three varchar parameters
>
> I then went to build a datawindow (freeform) off of this stored proc
> and
> a message comes up, right after I select the stored proc, that reads
>
> 'Cannot Create Datawindow'
>
> SQL State = 34000
> microsoft odbc SQL Server Driver [SQL Server} A cursor with the
> name 'SEC_HIER_CUR'
> does not exist.
>
> execute dbo.sp_cs_heir;1 @vp_id=:vp_id,
> @off_id=:off_id,@mgr_id=:mgr_id
>
> There is nothing wrong with the Cursor, so why is this happening?
>
> Anyhelp would be greatly appreciated.
>
> Thanks
> Tony


TonyMIS Posted on 2008-11-25 15:01:59.0Z
From: TonyMIS <aesteves@bostonfinancial.com>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: Re: building a dw off of a stored proc -- errors out
Date: Tue, 25 Nov 2008 07:01:59 -0800 (PST)
Organization: http://groups.google.com
Lines: 56
Message-ID: <5c5bf433-623a-4edc-b779-685de2884b68@r40g2000yqj.googlegroups.com>
References: <e02c0ca0-22f5-4f2a-a7e0-da9dea712376@x8g2000yqk.googlegroups.com> <492b87b1@forums-1-dub>
NNTP-Posting-Host: 209.0.112.9
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1227625320 18098 127.0.0.1 (25 Nov 2008 15:02:00 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 25 Nov 2008 15:02:00 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r40g2000yqj.googlegroups.com; posting-host=209.0.112.9; posting-account=XF6ckgoAAACs7hQvjds3XT2_H3YZR6k7
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; InfoPath.1),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!r40g2000yqj.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88237
Article PK: 417491

On Nov 25, 12:05 am, "Paul Horan[Sybase]" <phoran_nos...@sybase.com>

wrote:
> When you create a datawindow from a stored procedure, PB will actually
> invoke the proc with NULL values in the parameters, so that it can
> introspect the result set that comes back and paint the proper column
> names/types into the datawindow definition.
>
> If that causes your proc to error out (or prematurely exit) before the final
> select statement, you'll get strange messages like this.
> Here's what to try:
> - Comment out everything in the proc except the declaration and the final
> SELECT statement and save it.
> - Paint the datawindow against the proc.
> - Uncomment the proc and save it.
>
> Paul Horan[Sybase]
>
> "TonyMIS" <aeste...@bostonfinancial.com> wrote in message
>
> news:e02c0ca0-22f5-4f2a-a7e0-da9dea712376@x8g2000yqk.googlegroups.com...
>
>
>
> > Hello
> > pb 10 build 4410 MSsqlServer 8.00.194
>
> > I built a stored proc with three varchar parameters.
>
> > Tested it (in Query Analyzer) and it works fine. The stored proc
> > itself is one that declares three varchar parameters
>
> > I then went to build a datawindow (freeform) off of this stored proc
> > and
> > a message comes up, right after I select the stored proc, that reads
>
> >   'Cannot Create Datawindow'
>
> >    SQL State = 34000
> >    microsoft odbc SQL Server Driver [SQL Server} A cursor with the
> > name 'SEC_HIER_CUR'
> >    does not exist.
>
> >    execute dbo.sp_cs_heir;1 @vp_id=:vp_id,
> > @off_id=:off_id,@mgr_id=:mgr_id
>
> > There is nothing wrong with the Cursor, so why is this happening?
>
> > Anyhelp would be greatly appreciated.
>
> > Thanks
> > Tony- Hide quoted text -
>
> - Show quoted text -

Thank You sir, it seems to have worked.