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.

Date vs Datetime

6 posts in General Discussion Last posting was on 2012-12-06 12:39:04.0Z
M.Karthikeyan Posted on 2012-12-05 07:03:42.0Z
Sender: 3851.50bef170.1804289383@sybase.com
From: M.Karthikeyan
Newsgroups: sybase.public.ase.general
Subject: Date vs Datetime
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50bef1ce.3890.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 4 Dec 2012 23:03:42 -0800
X-Trace: forums-1-dub 1354691022 172.20.134.41 (4 Dec 2012 23:03:42 -0800)
X-Original-Trace: 4 Dec 2012 23:03:42 -0800, 172.20.134.41
Lines: 49
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31580
Article PK: 1020104

I am facing some issue between Date & DateTime datatype.

create table dtchk
(
dt date null
)

insert into dtchk
select null

insert into dtchk
select '01/01/2012'

insert into dtchk
select '01/01/2013'

insert into dtchk
select convert(date,getdate())

insert into dtchk
select getdate()

#1)

select dt from dtchk

Warning Message: ct_fetch(): user api layer: internal common
library error: The bind of result set item 1 resulted in
truncation.

output:

J
D
D


#2)
select convert(datetime,dt) from dtchk

No Warning Message and the output is

Jan 1 2012 12:00AM
Dec 5 2012 12:00AM
Dec 5 2012 12:00AM
Jan 1 2013 12:00AM

what is the solution to this problem? Do I need to change
anything from CT-LIBRARY side?


Luc Van der Veurst Posted on 2012-12-05 10:54:37.0Z
From: "Luc Van der Veurst" <dba_azvub@hotmail.com>
Newsgroups: sybase.public.ase.general
References: <50bef1ce.3890.1681692777@sybase.com>
Subject: Re: Date vs Datetime
Lines: 58
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Original
X-Forwarded: by - (DeleGate/5.8.7)
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50bf27ed$1@forums-1-dub>
Date: 5 Dec 2012 02:54:37 -0800
X-Trace: forums-1-dub 1354704877 172.20.134.152 (5 Dec 2012 02:54:37 -0800)
X-Original-Trace: 5 Dec 2012 02:54:37 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31581
Article PK: 1020105

Yes, you are using a version of ct-lib that doesn't understand the Date
datatype.
SDK 15+ will work, 12.5.1 seems to work too.

Luc.

<M.Karthikeyan> wrote in message news:50bef1ce.3890.1681692777@sybase.com...
>I am facing some issue between Date & DateTime datatype.
>
> create table dtchk
> (
> dt date null
> )
>
> insert into dtchk
> select null
>
> insert into dtchk
> select '01/01/2012'
>
> insert into dtchk
> select '01/01/2013'
>
> insert into dtchk
> select convert(date,getdate())
>
> insert into dtchk
> select getdate()
>
> #1)
>
> select dt from dtchk
>
> Warning Message: ct_fetch(): user api layer: internal common
> library error: The bind of result set item 1 resulted in
> truncation.
>
> output:
>
> J
> D
> D
>
>
> #2)
> select convert(datetime,dt) from dtchk
>
> No Warning Message and the output is
>
> Jan 1 2012 12:00AM
> Dec 5 2012 12:00AM
> Dec 5 2012 12:00AM
> Jan 1 2013 12:00AM
>
> what is the solution to this problem? Do I need to change
> anything from CT-LIBRARY side?


karthik Posted on 2012-12-06 05:06:02.0Z
Sender: 156e.50c0274a.1804289383@sybase.com
From: Karthik
Newsgroups: sybase.public.ase.general
Subject: Re: Date vs Datetime
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50c027ba.1589.1681692777@sybase.com>
References: <50bf27ed$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 5 Dec 2012 21:06:02 -0800
X-Trace: forums-1-dub 1354770362 172.20.134.41 (5 Dec 2012 21:06:02 -0800)
X-Original-Trace: 5 Dec 2012 21:06:02 -0800, 172.20.134.41
Lines: 61
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31582
Article PK: 1158158

How to identify the ct-lib version?
what is the fix for this?

> Yes, you are using a version of ct-lib that doesn't
> understand the Date datatype.
> SDK 15+ will work, 12.5.1 seems to work too.
>
> Luc.
>
> <M.Karthikeyan> wrote in message
> news:50bef1ce.3890.1681692777@sybase.com... >I am facing
> some issue between Date & DateTime datatype. >
> > create table dtchk
> > (
> > dt date null
> > )
> >
> > insert into dtchk
> > select null
> >
> > insert into dtchk
> > select '01/01/2012'
> >
> > insert into dtchk
> > select '01/01/2013'
> >
> > insert into dtchk
> > select convert(date,getdate())
> >
> > insert into dtchk
> > select getdate()
> >
> > #1)
> >
> > select dt from dtchk
> >
> > Warning Message: ct_fetch(): user api layer: internal
> > common library error: The bind of result set item 1
> > resulted in truncation.
> >
> > output:
> >
> > J
> > D
> > D
> >
> >
> > #2)
> > select convert(datetime,dt) from dtchk
> >
> > No Warning Message and the output is
> >
> > Jan 1 2012 12:00AM
> > Dec 5 2012 12:00AM
> > Dec 5 2012 12:00AM
> > Jan 1 2013 12:00AM
> >
> > what is the solution to this problem? Do I need to
> > change anything from CT-LIBRARY side?
>
>


Michael Peppler (Team Sybase) Posted on 2012-12-06 05:55:33.0Z
From: Michael Peppler (Team Sybase) <mpeppler@peppler.org>
Newsgroups: sybase.public.ase.general
Message-ID: <50c03355@forums-1-dub>
References: <50bef1ce.3890.1681692777@sybase.com> <50bf27ed$1@forums-1-dub> <50c027ba.1589.1681692777@sybase.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Subject: Re: Date vs Datetime
User-Agent: Unison/2.1.9
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 5 Dec 2012 21:55:33 -0800
X-Trace: forums-1-dub 1354773333 172.20.134.152 (5 Dec 2012 21:55:33 -0800)
X-Original-Trace: 5 Dec 2012 21:55:33 -0800, vip152.sybase.com
Lines: 13
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31586
Article PK: 1158162

On 2012-12-06 05:06:02 +0000, Karthik said:

> How to identify the ct-lib version?
> what is the fix for this?

Are you using isql, or a home grown application?

If isql: isql -v

Michael


karthik Posted on 2012-12-06 07:42:45.0Z
Sender: 156e.50c0274a.1804289383@sybase.com
From: Karthik
Newsgroups: sybase.public.ase.general
Subject: Re: Date vs Datetime
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50c04c75.1a9d.1681692777@sybase.com>
References: <50c03355@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 5 Dec 2012 23:42:45 -0800
X-Trace: forums-1-dub 1354779765 172.20.134.41 (5 Dec 2012 23:42:45 -0800)
X-Original-Trace: 5 Dec 2012 23:42:45 -0800, 172.20.134.41
Lines: 15
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31587
Article PK: 1158164

I am using sql advantage.

> On 2012-12-06 05:06:02 +0000, Karthik said:
>
> > How to identify the ct-lib version?
> > what is the fix for this?
>
>
> Are you using isql, or a home grown application?
>
> If isql: isql -v
>
> Michael
>
>


Luc Van der Veurst Posted on 2012-12-06 12:39:04.0Z
From: "Luc Van der Veurst" <dba_azvub@hotmail.com>
Newsgroups: sybase.public.ase.general
References: <50c03355@forums-1-dub> <50c04c75.1a9d.1681692777@sybase.com>
Subject: Re: Date vs Datetime
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646: Format=Flowed; Original
X-Forwarded: by - (DeleGate/5.8.7)
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50c091e8$1@forums-1-dub>
Date: 6 Dec 2012 04:39:04 -0800
X-Trace: forums-1-dub 1354797544 172.20.134.152 (6 Dec 2012 04:39:04 -0800)
X-Original-Trace: 6 Dec 2012 04:39:04 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31588
Article PK: 1158168


<Karthik> wrote in message news:50c04c75.1a9d.1681692777@sybase.com...
>I am using sql advantage.
>

And on what platform ?

From the sybase ase 15.0 manuals :

<begin>
SQL Advantage no longer supported
Sybase no longer maintains SQL AdvantageT. It connects to Adaptive Server
15.0, but because it does not include some newer API features in Open Client
15.0, it has limited functionality.

If you have problems running SQL Advantage on a machine that includes
Adaptive Server 15.0 PC-Client, SQLAdvantage may be finding Open Client 15.0
in the path ahead of Open Client 12.5. Because Open Client 15.0 renamed some
of the dll libraries, SQLAdvantage fails when it uses these libraries. As a
workaround, create a shell script that includes only the Open Client 12.5
library directories (and none of the Open Client 15.0 library directories)
in the path environment variable. Launch SQLAdvantage from this shell
script.

<end>

And this was in 2006.

I'm using sqsh to query the database, I have colleagues who use
db-visualizer, that tool supports the date datatype.

Luc.