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 procedure datawindow-datatype issue

12 posts in DataWindow Last posting was on 2009-01-13 14:49:43.0Z
CarolD Posted on 2008-12-18 14:40:41.0Z
From: "CarolD" <clc@css.ncifcrf.gov>
Newsgroups: sybase.public.powerbuilder.datawindow
Subject: stored procedure datawindow-datatype issue
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1914
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <494a60e9@forums-1-dub>
Date: 18 Dec 2008 06:40:41 -0800
X-Trace: forums-1-dub 1229611241 10.22.241.152 (18 Dec 2008 06:40:41 -0800)
X-Original-Trace: 18 Dec 2008 06:40:41 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88450
Article PK: 417703

this is a follow up to an earlier question that didn't receive any
responses.

I did manage to create my datawindow after checking 'manual result set'

however when trying to retrieve data into it i get the same 'Invalid
character value for cast specification'

I do know that the third retr. arg. in the sp is a bit column or a
true/false column and the retr. arg in my datawindow defaulted to number. I
don't have a boolean option in that drop down. What is the answer to this?
Ask the sp coder to change his column type? or is there some other manual
way around this datatype issue?

thanks in advance for any help


Scott Morris Posted on 2008-12-18 15:46:29.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 27
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: <494a7055@forums-1-dub>
Date: 18 Dec 2008 07:46:29 -0800
X-Trace: forums-1-dub 1229615189 10.22.241.152 (18 Dec 2008 07:46:29 -0800)
X-Original-Trace: 18 Dec 2008 07:46:29 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88453
Article PK: 417707


"CarolD" <clc@css.ncifcrf.gov> wrote in message
news:494a60e9@forums-1-dub...
> this is a follow up to an earlier question that didn't receive any
> responses.
>
> I did manage to create my datawindow after checking 'manual result set'
>
> however when trying to retrieve data into it i get the same 'Invalid
> character value for cast specification'
>
> I do know that the third retr. arg. in the sp is a bit column or a
> true/false column and the retr. arg in my datawindow defaulted to number.
> I
> don't have a boolean option in that drop down. What is the answer to this?
> Ask the sp coder to change his column type? or is there some other manual
> way around this datatype issue?
>
> thanks in advance for any help

The problem with posting a followup in a new thread is that the reader loses
the context, along with any useful information previously posted.
Ultimately, the problem is a bug in PB and you will need to a workaround.
The bit datatype as an argument is the issue and you will not be able to
successfully execute the procedure from PB as is - at least not in that
version.


CarolD Posted on 2008-12-23 14:38:08.0Z
From: "CarolD" <clc@css.ncifcrf.gov>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 39
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1933
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4950f7d0$1@forums-1-dub>
Date: 23 Dec 2008 06:38:08 -0800
X-Trace: forums-1-dub 1230043088 10.22.241.152 (23 Dec 2008 06:38:08 -0800)
X-Original-Trace: 23 Dec 2008 06:38:08 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88468
Article PK: 417722

is there some other work around besides the datawindow that I can get rows
returned from a stored procedure with an argument defined as bit?

"Scott Morris" <bogus@bogus.com> wrote in message
news:494a7055@forums-1-dub...
> "CarolD" <clc@css.ncifcrf.gov> wrote in message
> news:494a60e9@forums-1-dub...
> > this is a follow up to an earlier question that didn't receive any
> > responses.
> >
> > I did manage to create my datawindow after checking 'manual result set'
> >
> > however when trying to retrieve data into it i get the same 'Invalid
> > character value for cast specification'
> >
> > I do know that the third retr. arg. in the sp is a bit column or a
> > true/false column and the retr. arg in my datawindow defaulted to
number.
> > I
> > don't have a boolean option in that drop down. What is the answer to
this?
> > Ask the sp coder to change his column type? or is there some other
manual
> > way around this datatype issue?
> >
> > thanks in advance for any help
>
> The problem with posting a followup in a new thread is that the reader
loses
> the context, along with any useful information previously posted.
> Ultimately, the problem is a bug in PB and you will need to a workaround.
> The bit datatype as an argument is the issue and you will not be able to
> successfully execute the procedure from PB as is - at least not in that
> version.
>
>


Scott Morris Posted on 2008-12-23 18:54:27.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub> <4950f7d0$1@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 15
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: <495133e3@forums-1-dub>
Date: 23 Dec 2008 10:54:27 -0800
X-Trace: forums-1-dub 1230058467 10.22.241.152 (23 Dec 2008 10:54:27 -0800)
X-Original-Trace: 23 Dec 2008 10:54:27 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88469
Article PK: 417723


"CarolD" <clc@css.ncifcrf.gov> wrote in message
news:4950f7d0$1@forums-1-dub...
> is there some other work around besides the datawindow that I can get rows
> returned from a stored procedure with an argument defined as bit?

What I did - create a wrapper stored procedure with the same "other"
arguments and mask the bit argument as something that PB likes - char (Y,
N), tinyint (1, 0), etc.

Given the problem PB is having, my reaction has been to avoid bit -
especially when it doesn't really offer any real advantage. And especially
when using an unsupported version of Powerbuilder.


CarolD Posted on 2009-01-07 17:56:12.0Z
From: "CarolD" <clc@css.ncifcrf.gov>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub> <4950f7d0$1@forums-1-dub> <495133e3@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1933
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4964ecbc$1@forums-1-dub>
Date: 7 Jan 2009 09:56:12 -0800
X-Trace: forums-1-dub 1231350972 10.22.241.152 (7 Jan 2009 09:56:12 -0800)
X-Original-Trace: 7 Jan 2009 09:56:12 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88505
Article PK: 417758

can you tell me in what version of PB this would work?

I'm currently using PB9.02 Build 7661

Thanks.

"Scott Morris" <bogus@bogus.com> wrote in message
news:495133e3@forums-1-dub...
> "CarolD" <clc@css.ncifcrf.gov> wrote in message
> news:4950f7d0$1@forums-1-dub...
> > is there some other work around besides the datawindow that I can get
rows
> > returned from a stored procedure with an argument defined as bit?
>
> What I did - create a wrapper stored procedure with the same "other"
> arguments and mask the bit argument as something that PB likes - char (Y,
> N), tinyint (1, 0), etc.
>
> Given the problem PB is having, my reaction has been to avoid bit -
> especially when it doesn't really offer any real advantage. And
especially
> when using an unsupported version of Powerbuilder.
>
>
>


Scott Morris Posted on 2009-01-07 21:08:11.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub> <4950f7d0$1@forums-1-dub> <495133e3@forums-1-dub> <4964ecbc$1@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 10
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: <496519bb$1@forums-1-dub>
Date: 7 Jan 2009 13:08:11 -0800
X-Trace: forums-1-dub 1231362491 10.22.241.152 (7 Jan 2009 13:08:11 -0800)
X-Original-Trace: 7 Jan 2009 13:08:11 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88507
Article PK: 417761


"CarolD" <clc@css.ncifcrf.gov> wrote in message
news:4964ecbc$1@forums-1-dub...
> can you tell me in what version of PB this would work?
>
> I'm currently using PB9.02 Build 7661

sorry but have not seen any benefit in revisiting the issue once I figured
out the cause (and a trivial workaround).


CarolD Posted on 2009-01-09 14:06:16.0Z
From: "CarolD" <clc@css.ncifcrf.gov>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub> <4950f7d0$1@forums-1-dub> <495133e3@forums-1-dub> <4964ecbc$1@forums-1-dub> <496519bb$1@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1933
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496759d8$1@forums-1-dub>
Date: 9 Jan 2009 06:06:16 -0800
X-Trace: forums-1-dub 1231509976 10.22.241.152 (9 Jan 2009 06:06:16 -0800)
X-Original-Trace: 9 Jan 2009 06:06:16 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88536
Article PK: 417787

i finally convinced the group writing the stored procedure to give me one
that didn't use the bit argument. so I only have 2 args now and both are
integers that when I create the datawindow the retr. args default to number.
I still get the same error.

Invalid char for cast specification.


I have checked the columns of data that I am retrieving are correct data
types.

any ideas?

"Scott Morris" <bogus@bogus.com> wrote in message
news:496519bb$1@forums-1-dub...
> "CarolD" <clc@css.ncifcrf.gov> wrote in message
> news:4964ecbc$1@forums-1-dub...
> > can you tell me in what version of PB this would work?
> >
> > I'm currently using PB9.02 Build 7661
>
> sorry but have not seen any benefit in revisiting the issue once I figured
> out the cause (and a trivial workaround).
>
>


CarolD Posted on 2009-01-09 15:15:46.0Z
From: "CarolD" <clc@css.ncifcrf.gov>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub> <4950f7d0$1@forums-1-dub> <495133e3@forums-1-dub> <4964ecbc$1@forums-1-dub> <496519bb$1@forums-1-dub> <496759d8$1@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 54
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1933
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <49676a22$1@forums-1-dub>
Date: 9 Jan 2009 07:15:46 -0800
X-Trace: forums-1-dub 1231514146 10.22.241.152 (9 Jan 2009 07:15:46 -0800)
X-Original-Trace: 9 Jan 2009 07:15:46 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88544
Article PK: 417800

i think it may have something to do with a date column...all other returned
columns are string or number.

I defined the column in question in my result set as a date.

the stored procedure is coded select ..... t.datecompleted[date] , .....

the column in the table t (which is a view) is defined as datetime

I'm looking now at DBParms for dates... I don't ususally need to bother with
this so I am at a loss if this is really even where I should be looking.

Again I am using PB9.0.2 Build 7661.
I am using an ODBC connection to a SQL Server database as show below.

// Profile TrainingPortal_dev
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = False
SQLCA.DBParm = "ConnectString='DSN=TrainingPortal_dev;UID=uuu;PWD=pppppp'"

"CarolD" <clc@css.ncifcrf.gov> wrote in message
news:496759d8$1@forums-1-dub...
> i finally convinced the group writing the stored procedure to give me one
> that didn't use the bit argument. so I only have 2 args now and both are
> integers that when I create the datawindow the retr. args default to
number.
> I still get the same error.
>
> Invalid char for cast specification.
>
>
> I have checked the columns of data that I am retrieving are correct data
> types.
>
> any ideas?
>
>
> "Scott Morris" <bogus@bogus.com> wrote in message
> news:496519bb$1@forums-1-dub...
> > "CarolD" <clc@css.ncifcrf.gov> wrote in message
> > news:4964ecbc$1@forums-1-dub...
> > > can you tell me in what version of PB this would work?
> > >
> > > I'm currently using PB9.02 Build 7661
> >
> > sorry but have not seen any benefit in revisiting the issue once I
figured
> > out the cause (and a trivial workaround).
> >
> >
>
>


CarolD Posted on 2009-01-09 15:51:10.0Z
From: "CarolD" <clc@css.ncifcrf.gov>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub> <4950f7d0$1@forums-1-dub> <495133e3@forums-1-dub> <4964ecbc$1@forums-1-dub> <496519bb$1@forums-1-dub> <496759d8$1@forums-1-dub> <49676a22$1@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue-db connection
Lines: 66
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1933
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4967726e$1@forums-1-dub>
Date: 9 Jan 2009 07:51:10 -0800
X-Trace: forums-1-dub 1231516270 10.22.241.152 (9 Jan 2009 07:51:10 -0800)
X-Original-Trace: 9 Jan 2009 07:51:10 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88547
Article PK: 417801

okay i tried my datawindow retrieval using a MSS Microsoft SQL Server
connection and it works great. so that i guess means it is with the db
connection. I need to use ODBC so does anyone know the magic parm i need to
set. Many thanks in advance.

"CarolD" <clc@css.ncifcrf.gov> wrote in message
news:49676a22$1@forums-1-dub...
> i think it may have something to do with a date column...all other
returned
> columns are string or number.
>
> I defined the column in question in my result set as a date.
>
> the stored procedure is coded select ..... t.datecompleted[date] , .....
>
> the column in the table t (which is a view) is defined as datetime
>
> I'm looking now at DBParms for dates... I don't ususally need to bother
with
> this so I am at a loss if this is really even where I should be looking.
>
> Again I am using PB9.0.2 Build 7661.
> I am using an ODBC connection to a SQL Server database as show below.
>
> // Profile TrainingPortal_dev
> SQLCA.DBMS = "ODBC"
> SQLCA.AutoCommit = False
> SQLCA.DBParm = "ConnectString='DSN=TrainingPortal_dev;UID=uuu;PWD=pppppp'"
>
> "CarolD" <clc@css.ncifcrf.gov> wrote in message
> news:496759d8$1@forums-1-dub...
> > i finally convinced the group writing the stored procedure to give me
one
> > that didn't use the bit argument. so I only have 2 args now and both are
> > integers that when I create the datawindow the retr. args default to
> number.
> > I still get the same error.
> >
> > Invalid char for cast specification.
> >
> >
> > I have checked the columns of data that I am retrieving are correct data
> > types.
> >
> > any ideas?
> >
> >
> > "Scott Morris" <bogus@bogus.com> wrote in message
> > news:496519bb$1@forums-1-dub...
> > > "CarolD" <clc@css.ncifcrf.gov> wrote in message
> > > news:4964ecbc$1@forums-1-dub...
> > > > can you tell me in what version of PB this would work?
> > > >
> > > > I'm currently using PB9.02 Build 7661
> > >
> > > sorry but have not seen any benefit in revisiting the issue once I
> figured
> > > out the cause (and a trivial workaround).
> > >
> > >
> >
> >
>
>


Scott Morris Posted on 2009-01-12 15:31:16.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub> <4950f7d0$1@forums-1-dub> <495133e3@forums-1-dub> <4964ecbc$1@forums-1-dub> <496519bb$1@forums-1-dub> <496759d8$1@forums-1-dub> <49676a22$1@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 41
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: <496b6244$1@forums-1-dub>
Date: 12 Jan 2009 07:31:16 -0800
X-Trace: forums-1-dub 1231774276 10.22.241.152 (12 Jan 2009 07:31:16 -0800)
X-Original-Trace: 12 Jan 2009 07:31:16 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88561
Article PK: 417815


"CarolD" <clc@css.ncifcrf.gov> wrote in message
news:49676a22$1@forums-1-dub...
>i think it may have something to do with a date column...all other returned
> columns are string or number.
>
> I defined the column in question in my result set as a date.
>
> the stored procedure is coded select ..... t.datecompleted[date] , .....

I have no idea what this means. It is not valid syntax for TSQL and I
certainly would not use "date" as a column alias. Is this an attempt to
cast the column to a different datatype? Since TSQL does not have a date
datatype (prior to 2008), I'm not certain what you are trying to do. But if
you are trying to force a datatime column in the source into a date column
in the datawindow, that may be the problem.

>
> the column in the table t (which is a view) is defined as datetime
>
> I'm looking now at DBParms for dates... I don't ususally need to bother
> with
> this so I am at a loss if this is really even where I should be looking.
>
> Again I am using PB9.0.2 Build 7661.
> I am using an ODBC connection to a SQL Server database as show below.
>
> // Profile TrainingPortal_dev
> SQLCA.DBMS = "ODBC"
> SQLCA.AutoCommit = False
> SQLCA.DBParm = "ConnectString='DSN=TrainingPortal_dev;UID=uuu;PWD=pppppp'"

Why exactly are you pursuing the idea that there is an issue with a datetime
(or date) datatype? What specifically leads you to this? Personally I
would look at the actual SQL that is executed by PB when the error occurs.
There are at least two ways to do this - the easiest is to use the MS
profiler tool. The other is to trace the connection (by simply adding "TRA
" to dbms attribute of your connection prior to connecting - in your case
that would make it "TRA ODBC". You might also consider comparing the sql
executed by PB using an ODBC connection with that using a MSS connection.


CarolD Posted on 2009-01-12 20:16:29.0Z
From: "CarolD" <clc@css.ncifcrf.gov>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub> <4950f7d0$1@forums-1-dub> <495133e3@forums-1-dub> <4964ecbc$1@forums-1-dub> <496519bb$1@forums-1-dub> <496759d8$1@forums-1-dub> <49676a22$1@forums-1-dub> <496b6244$1@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 99
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1933
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1933
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <496ba51d$1@forums-1-dub>
Date: 12 Jan 2009 12:16:29 -0800
X-Trace: forums-1-dub 1231791389 10.22.241.152 (12 Jan 2009 12:16:29 -0800)
X-Original-Trace: 12 Jan 2009 12:16:29 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88568
Article PK: 417821

thanks for your response Scott,

actually I am not the one writing this stored procedure and I am not getting
much cooperation from them as you could tell from the previous postings just
trying to resovle the bit problem.

Once they rewrote the procedure to only 2 args both integer I still got the
same error

select error: SQLSTATE = 22005
[Microsoft][ ODBC SQL Server driver]Invalid character value for cast
specification.

because I assumed the bit problem was resolved I moved on to datatypes of
the result set. This datetime column seemed to be the problem. Yes the
writer of the sp is trying to cast a datetime column to a date column. I had
the column in my result set as a date. STill the same error.

I set the trace on and still got very generic info. with this same error
number 22005

/*---------------------------------------------------*/
/* 1/12/2009 13:39 */
/*---------------------------------------------------*/
(111a238): DIALOG CONNECT TO TRACE ODBC:
(111a238): DBPARM=ConnectString='DSN=TrainingPortal_dev;UID=dbf;PWD=dbfdbf'
(965.I64u MilliSeconds)
(111a238): PROCEDURE LIST: (77.I64u MilliSeconds)
(111a238): PROCEDURE SOURCE: (46.I64u MilliSeconds)
(111a238): PROCEDURE SOURCE: (4.I64u MilliSeconds)
(111a238): PROCEDURE PREPARE:
(111a238): execute dbo.spExportGetNewTranscripts;1 @ExportTypeId = 1,
@CourseId = 8 (406.I64u MilliSeconds)
(111a238):
Error 999 (rc -1) : SQLSTATE = 22005
[Microsoft][ODBC SQL Server Driver]Invalid character value for cast
specification
(111a238): CANCEL: (22.I64u MilliSeconds)

I was reading thru some other online postings where I thought it may be a
parm I could set on the odbc db connection. obviously if I knew waht that
would be I wouldn't be asking.

then I change my db connection to a native mss sql server connection and got
my data retrieved even with this datetime column being cast to a date. THis
further pointed me in the direction on my odbc connection and maybe a parm I
could set to make this work.

"Scott Morris" <bogus@bogus.com> wrote in message
news:496b6244$1@forums-1-dub...
> "CarolD" <clc@css.ncifcrf.gov> wrote in message
> news:49676a22$1@forums-1-dub...
> >i think it may have something to do with a date column...all other
returned
> > columns are string or number.
> >
> > I defined the column in question in my result set as a date.
> >
> > the stored procedure is coded select ..... t.datecompleted[date] , .....
>
> I have no idea what this means. It is not valid syntax for TSQL and I
> certainly would not use "date" as a column alias. Is this an attempt to
> cast the column to a different datatype? Since TSQL does not have a date
> datatype (prior to 2008), I'm not certain what you are trying to do. But
if
> you are trying to force a datatime column in the source into a date column
> in the datawindow, that may be the problem.
>
> >
> > the column in the table t (which is a view) is defined as datetime
> >
> > I'm looking now at DBParms for dates... I don't ususally need to bother
> > with
> > this so I am at a loss if this is really even where I should be looking.
> >
> > Again I am using PB9.0.2 Build 7661.
> > I am using an ODBC connection to a SQL Server database as show below.
> >
> > // Profile TrainingPortal_dev
> > SQLCA.DBMS = "ODBC"
> > SQLCA.AutoCommit = False
> > SQLCA.DBParm =
"ConnectString='DSN=TrainingPortal_dev;UID=uuu;PWD=pppppp'"
>
> Why exactly are you pursuing the idea that there is an issue with a
datetime
> (or date) datatype? What specifically leads you to this? Personally I
> would look at the actual SQL that is executed by PB when the error occurs.
> There are at least two ways to do this - the easiest is to use the MS
> profiler tool. The other is to trace the connection (by simply adding
"TRA
> " to dbms attribute of your connection prior to connecting - in your case
> that would make it "TRA ODBC". You might also consider comparing the sql
> executed by PB using an ODBC connection with that using a MSS connection.
>
>


Scott Morris Posted on 2009-01-13 14:49:43.0Z
From: "Scott Morris" <bogus@bogus.com>
Newsgroups: sybase.public.powerbuilder.datawindow
References: <494a60e9@forums-1-dub> <494a7055@forums-1-dub> <4950f7d0$1@forums-1-dub> <495133e3@forums-1-dub> <4964ecbc$1@forums-1-dub> <496519bb$1@forums-1-dub> <496759d8$1@forums-1-dub> <49676a22$1@forums-1-dub> <496b6244$1@forums-1-dub> <496ba51d$1@forums-1-dub>
Subject: Re: stored procedure datawindow-datatype issue
Lines: 11
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: <496caa07$3@forums-1-dub>
Date: 13 Jan 2009 06:49:43 -0800
X-Trace: forums-1-dub 1231858183 10.22.241.152 (13 Jan 2009 06:49:43 -0800)
X-Original-Trace: 13 Jan 2009 06:49:43 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.datawindow:88582
Article PK: 417835

Since this thread isn't getting much clearer, I'm just going to make some
assumptions and a suggestion.

If you change your "date" column in the datawindow to datetime, does this
clear up the problem? If not, then I'm out of ideas since I still don't
really understand what exactly is happening. It may help to create a new
datawindow using the current version of the stored procedure and compare the
column definitions of this new datawindow with the one you are currently
using.