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.

Simple Question about DW.Net Tutorial

7 posts in DataWindow .NET Last posting was on 2004-09-01 18:21:58.0Z
Mark Mazza Posted on 2004-09-01 16:07:38.0Z
Sender: a02.4135f0ca.1804289383@sybase.com
From: Mark Mazza
Newsgroups: sybase.public.datawindow.net
Subject: Simple Question about DW.Net Tutorial
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4135f551.a8e.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 1 Sep 2004 09:14:09 -0700, 10.22.241.42
Lines: 10
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Sep 2004 08:56:52 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Sep 2004 09:07:38 -0700
X-Trace: forums-1-dub 1094054858 10.22.108.75 (1 Sep 2004 09:07:38 -0700)
X-Original-Trace: 1 Sep 2004 09:07:38 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:272
Article PK: 124703

I've added a dw to a form in .net and as long as it doesn't
have retrieval arguements, it's working ok. Once I try to
retrieve a dw (built on a stored procedure with a single INT
arg) I'm getting the error:

Invalid Character for Cast Specification.

If I build the dw without using a stored procedure, I get no
error and everything works fine. Why does this not work
with the stored procedure?


dfish Posted on 2004-09-01 16:36:49.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: Simple Question about DW.Net Tutorial
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <4135f790.12453567@forums.sybase.com>
References: <4135f551.a8e.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
X-Original-NNTP-Posting-Host: vpn-concord-114.sybase.com
X-Original-Trace: 1 Sep 2004 09:43:21 -0700, vpn-concord-114.sybase.com
Lines: 30
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Sep 2004 09:26:03 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Sep 2004 09:36:49 -0700
X-Trace: forums-1-dub 1094056609 10.22.108.75 (1 Sep 2004 09:36:49 -0700)
X-Original-Trace: 1 Sep 2004 09:36:49 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:273
Article PK: 124704

Can you post the code you are using to call the retrieve method (with
variable declaration if used)?

I just tried this using the sp_customer_products stored procedure in
the EAS Demo DB V10 database and it worked fine.

Can you retrieve data in DataWindow Designer?

Regards,
Dave Fish
Sybase

TeamSybase blogs: http://www.teamsybase.net/blogs

DataWindow.NET code examples available on CodeXchange:
http://datawindownet.codexchange.sybase.com

On 1 Sep 2004 09:07:38 -0700, Mark Mazza wrote:

>I've added a dw to a form in .net and as long as it doesn't
>have retrieval arguements, it's working ok. Once I try to
>retrieve a dw (built on a stored procedure with a single INT
>arg) I'm getting the error:
>
>Invalid Character for Cast Specification.
>
>If I build the dw without using a stored procedure, I get no
>error and everything works fine. Why does this not work
>with the stored procedure?


Mark Mazza Posted on 2004-09-01 17:01:12.0Z
Sender: abc.4135f8bb.1804289383@sybase.com
From: Mark Mazza
Newsgroups: sybase.public.datawindow.net
Subject: Re: Simple Question about DW.Net Tutorial
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <413601e0.bcb.1681692777@sybase.com>
References: <4135f790.12453567@forums.sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 1 Sep 2004 10:07:44 -0700, 10.22.241.42
Lines: 70
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Sep 2004 09:50:26 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Sep 2004 10:01:12 -0700
X-Trace: forums-1-dub 1094058072 10.22.108.75 (1 Sep 2004 10:01:12 -0700)
X-Original-Trace: 1 Sep 2004 10:01:12 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:274
Article PK: 124705

Dave,

I have no problem retrieving in DataWindow Designer. I have
two dw's; one based on a MS SQL stored procedure and one
with a select statement

Here is the sp:

CREATE PROCEDURE dbo.sp_test @id int AS
SELECT provider.provider_id,
provider.last_name,
provider.first_name,
provider.middle_name
FROM provider
WHERE provider.provider_id = @id
GO

Here is the select on the dw:

SELECT provider.provider_id,
provider.last_name,
provider.first_name,
provider.middle_name
FROM provider
WHERE provider.provider_id = :id

I have two dw controls and two retrieve buttons on the
windows form in .Net. that have simple retrieve statements
for each dw:

Code for Button 1: dwWithSP.Retrieve(3)
Code for Button 2: dwWithSelect.Retrieve(3)

Button 2 works fine and with Button 1 I get the error?

I checked persmission on the sp, it retrieves fine in the DW
Designer.... I'm perplexed....

Mark

> Can you post the code you are using to call the retrieve
> method (with variable declaration if used)?
>
> I just tried this using the sp_customer_products stored
> procedure in the EAS Demo DB V10 database and it worked
> fine.
>
> Can you retrieve data in DataWindow Designer?
>
> Regards,
> Dave Fish
> Sybase
>
> TeamSybase blogs: http://www.teamsybase.net/blogs
>
> DataWindow.NET code examples available on CodeXchange:
> http://datawindownet.codexchange.sybase.com
>
> On 1 Sep 2004 09:07:38 -0700, Mark Mazza wrote:
>
> >I've added a dw to a form in .net and as long as it
> doesn't >have retrieval arguements, it's working ok. Once
> I try to >retrieve a dw (built on a stored procedure with
> a single INT >arg) I'm getting the error:
> >
> >Invalid Character for Cast Specification.
> >
> >If I build the dw without using a stored procedure, I get
> no >error and everything works fine. Why does this not
> work >with the stored procedure?
>


Jim O'Neil [Sybase] Posted on 2004-09-01 17:48:25.0Z
From: "Jim O'Neil [Sybase]" <joneil_at_sybase_dot_com>
Newsgroups: sybase.public.datawindow.net
Subject: Re: Simple Question about DW.Net Tutorial
Message-ID: <p22cj0pvnp7fk4lh9iid8dnq5ab79vlrt0@4ax.com>
References: <4135f790.12453567@forums.sybase.com> <413601e0.bcb.1681692777@sybase.com>
X-Newsreader: Forte Agent 2.0/32.652
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: joneilw2k.sybase.com
X-Original-Trace: 1 Sep 2004 10:54:58 -0700, joneilw2k.sybase.com
Lines: 78
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Sep 2004 10:37:40 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Sep 2004 10:48:25 -0700
X-Trace: forums-1-dub 1094060905 10.22.108.75 (1 Sep 2004 10:48:25 -0700)
X-Original-Trace: 1 Sep 2004 10:48:25 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:277
Article PK: 124707

I'm guessing you are using ODBC here. If so, check the Strip
Parameter Names check box on the Syntax tab of the datawindow profile
painter (which gives you the StripParmNames='yes' DBParm that you'd
need to include at runtime).

On 1 Sep 2004 10:01:12 -0700, Mark Mazza wrote:

>Dave,
>
>I have no problem retrieving in DataWindow Designer. I have
>two dw's; one based on a MS SQL stored procedure and one
>with a select statement
>
>Here is the sp:
>
>CREATE PROCEDURE dbo.sp_test @id int AS
> SELECT provider.provider_id,
> provider.last_name,
> provider.first_name,
> provider.middle_name
> FROM provider
> WHERE provider.provider_id = @id
>GO
>
>Here is the select on the dw:
>
> SELECT provider.provider_id,
> provider.last_name,
> provider.first_name,
> provider.middle_name
> FROM provider
> WHERE provider.provider_id = :id
>
>I have two dw controls and two retrieve buttons on the
>windows form in .Net. that have simple retrieve statements
>for each dw:
>
>Code for Button 1: dwWithSP.Retrieve(3)
>Code for Button 2: dwWithSelect.Retrieve(3)
>
>Button 2 works fine and with Button 1 I get the error?
>
>I checked persmission on the sp, it retrieves fine in the DW
>Designer.... I'm perplexed....
>
>Mark
>> Can you post the code you are using to call the retrieve
>> method (with variable declaration if used)?
>>
>> I just tried this using the sp_customer_products stored
>> procedure in the EAS Demo DB V10 database and it worked
>> fine.
>>
>> Can you retrieve data in DataWindow Designer?
>>
>> Regards,
>> Dave Fish
>> Sybase
>>
>> TeamSybase blogs: http://www.teamsybase.net/blogs
>>
>> DataWindow.NET code examples available on CodeXchange:
>> http://datawindownet.codexchange.sybase.com
>>
>> On 1 Sep 2004 09:07:38 -0700, Mark Mazza wrote:
>>
>> >I've added a dw to a form in .net and as long as it
>> doesn't >have retrieval arguements, it's working ok. Once
>> I try to >retrieve a dw (built on a stored procedure with
>> a single INT >arg) I'm getting the error:
>> >
>> >Invalid Character for Cast Specification.
>> >
>> >If I build the dw without using a stored procedure, I get
>> no >error and everything works fine. Why does this not
>> work >with the stored procedure?
>>


Mark Mazza Posted on 2004-09-01 18:21:58.0Z
Sender: c7e.413608e7.1804289383@sybase.com
From: Mark Mazza
Newsgroups: sybase.public.datawindow.net
Subject: Re: Simple Question about DW.Net Tutorial
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <413614cf.dae.1681692777@sybase.com>
References: <p22cj0pvnp7fk4lh9iid8dnq5ab79vlrt0@4ax.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 1 Sep 2004 11:28:31 -0700, 10.22.241.42
Lines: 92
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Sep 2004 11:11:12 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Sep 2004 11:21:58 -0700
X-Trace: forums-1-dub 1094062918 10.22.108.75 (1 Sep 2004 11:21:58 -0700)
X-Original-Trace: 1 Sep 2004 11:21:58 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:279
Article PK: 124708

Yes....that's right!! I had it checked in my Database
Profile in DW Designer, but I didn't include the added
syntax to my Transaction object in .NET

Here's what I had:
ConnectString='DSN=sba;UID=;PWD='

Here's what I needed:
ConnectString='DSN=sba;UID=;PWD=',StripParmNames='Yes'

Thank you kindly!
Mark

> I'm guessing you are using ODBC here. If so, check the
> Strip Parameter Names check box on the Syntax tab of the
> datawindow profile painter (which gives you the
> StripParmNames='yes' DBParm that you'd need to include at
> runtime).
>
> On 1 Sep 2004 10:01:12 -0700, Mark Mazza wrote:
>
> >Dave,
> >
> >I have no problem retrieving in DataWindow Designer. I
> have >two dw's; one based on a MS SQL stored procedure and
> one >with a select statement
> >
> >Here is the sp:
> >
> >CREATE PROCEDURE dbo.sp_test @id int AS
> > SELECT provider.provider_id,
> > provider.last_name,
> > provider.first_name,
> > provider.middle_name
> > FROM provider
> > WHERE provider.provider_id = @id
> >GO
> >
> >Here is the select on the dw:
> >
> > SELECT provider.provider_id,
> > provider.last_name,
> > provider.first_name,
> > provider.middle_name
> > FROM provider
> > WHERE provider.provider_id = :id
> >
> >I have two dw controls and two retrieve buttons on the
> >windows form in .Net. that have simple retrieve
> statements >for each dw:
> >
> >Code for Button 1: dwWithSP.Retrieve(3)
> >Code for Button 2: dwWithSelect.Retrieve(3)
> >
> >Button 2 works fine and with Button 1 I get the error?
> >
> >I checked persmission on the sp, it retrieves fine in the
> DW >Designer.... I'm perplexed....
> >
> >Mark
> >> Can you post the code you are using to call the
> retrieve >> method (with variable declaration if used)?
> >>
> >> I just tried this using the sp_customer_products stored
> >> procedure in the EAS Demo DB V10 database and it worked
> >> fine.
> >>
> >> Can you retrieve data in DataWindow Designer?
> >>
> >> Regards,
> >> Dave Fish
> >> Sybase
> >>
> >> TeamSybase blogs: http://www.teamsybase.net/blogs
> >>
> >> DataWindow.NET code examples available on CodeXchange:
> >> http://datawindownet.codexchange.sybase.com
> >>
> >> On 1 Sep 2004 09:07:38 -0700, Mark Mazza wrote:
> >>
> >> >I've added a dw to a form in .net and as long as it
> >> doesn't >have retrieval arguements, it's working ok.
> Once >> I try to >retrieve a dw (built on a stored
> procedure with >> a single INT >arg) I'm getting the
> error: >> >
> >> >Invalid Character for Cast Specification.
> >> >
> >> >If I build the dw without using a stored procedure, I
> get >> no >error and everything works fine. Why does this
> not >> work >with the stored procedure?
> >>
>


dfish Posted on 2004-09-01 17:20:36.0Z
From: dfish@_no_spam_sybase.com (Dave Fish [Team Sybase])
Newsgroups: sybase.public.datawindow.net
Subject: Re: Simple Question about DW.Net Tutorial
Organization: Sybase Professional Services
Reply-To: nospam_dfish@sybase.com_nospam
Message-ID: <41360132.14919643@forums.sybase.com>
References: <4135f790.12453567@forums.sybase.com> <413601e0.bcb.1681692777@sybase.com>
X-Newsreader: Forte Free Agent 1.21/32.243
X-Original-NNTP-Posting-Host: vpn-concord-114.sybase.com
X-Original-Trace: 1 Sep 2004 10:27:06 -0700, vpn-concord-114.sybase.com
Lines: 95
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 1 Sep 2004 10:09:48 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 1 Sep 2004 10:20:36 -0700
X-Trace: forums-1-dub 1094059236 10.22.108.75 (1 Sep 2004 10:20:36 -0700)
X-Original-Trace: 1 Sep 2004 10:20:36 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.datawindow.net:276
Article PK: 124710

I should have asked how you are connecting to the database (ADO .NET,
OLEDB, ODBC?). Also, are you using the same connection type in
DataWindow Designer?

Also, is it C# or Visual Basic .NET? It shouldn't matter but I want to
try and duplicate the problem here.

Finally, have you tried casting the retrieval argument
(Retrieve(CInt(3)) ? Grasping at straws I know but given the error
message you are receiving something tells me it doesn't like the
literal. You could also try declaring an INT variable, setting it to 3
and passing that as the retrieval argument.

Regards,
Dave Fish
Sybase

TeamSybase blogs: http://www.teamsybase.net/blogs

DataWindow.NET code examples available on CodeXchange:
http://datawindownet.codexchange.sybase.com

On 1 Sep 2004 10:01:12 -0700, Mark Mazza wrote:

>Dave,
>
>I have no problem retrieving in DataWindow Designer. I have
>two dw's; one based on a MS SQL stored procedure and one
>with a select statement
>
>Here is the sp:
>
>CREATE PROCEDURE dbo.sp_test @id int AS
> SELECT provider.provider_id,
> provider.last_name,
> provider.first_name,
> provider.middle_name
> FROM provider
> WHERE provider.provider_id = @id
>GO
>
>Here is the select on the dw:
>
> SELECT provider.provider_id,
> provider.last_name,
> provider.first_name,
> provider.middle_name
> FROM provider
> WHERE provider.provider_id = :id
>
>I have two dw controls and two retrieve buttons on the
>windows form in .Net. that have simple retrieve statements
>for each dw:
>
>Code for Button 1: dwWithSP.Retrieve(3)
>Code for Button 2: dwWithSelect.Retrieve(3)
>
>Button 2 works fine and with Button 1 I get the error?
>
>I checked persmission on the sp, it retrieves fine in the DW
>Designer.... I'm perplexed....
>
>Mark
>> Can you post the code you are using to call the retrieve
>> method (with variable declaration if used)?
>>
>> I just tried this using the sp_customer_products stored
>> procedure in the EAS Demo DB V10 database and it worked
>> fine.
>>
>> Can you retrieve data in DataWindow Designer?
>>
>> Regards,
>> Dave Fish
>> Sybase
>>
>> TeamSybase blogs: http://www.teamsybase.net/blogs
>>
>> DataWindow.NET code examples available on CodeXchange:
>> http://datawindownet.codexchange.sybase.com
>>
>> On 1 Sep 2004 09:07:38 -0700, Mark Mazza wrote:
>>
>> >I've added a dw to a form in .net and as long as it
>> doesn't >have retrieval arguements, it's working ok. Once
>> I try to >retrieve a dw (built on a stored procedure with
>> a single INT >arg) I'm getting the error:
>> >
>> >Invalid Character for Cast Specification.
>> >
>> >If I build the dw without using a stored procedure, I get
>> no >error and everything works fine. Why does this not
>> work >with the stored procedure?
>>