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.

Problems with identity fields in Sybase 11.5. Please help

2 posts in Windows NT Last posting was on 2001-02-02 11:11:03.0Z
Shu Zhan Posted on 2000-04-12 17:38:41.0Z
Reply-To: "Shu Zhan" <shuzan@actcosys.com>
From: "Shu Zhan" <shuzan@actcosys.com>
Subject: Problems with identity fields in Sybase 11.5. Please help
Date: Wed, 12 Apr 2000 13:38:41 -0400
Lines: 12
Organization: Actco Systems
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
Message-ID: <dkhJHcKp$GA.212@forums.sybase.com>
Newsgroups: sybase.public.sqlserver.nt
NNTP-Posting-Host: actcosys.com 216.94.84.130
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.sqlserver.nt:2329
Article PK: 1089758

Hi All,
We are having some strange problems with reading values of indentity fields
from Sybase 11.5 database. We are using ADO2.1. Whenever we hit a value that
is a multiple of 10, e.g. 10, 20, 30....etc the last digit (i.e. 0) gets
dropped and we get a type mismtach error. Has anyone seen this problem
before? We did not have this problems with previous versions of ADO, e.g.
ADO1.5. Any help with this problem would be appreciated.

thanks
--Zan


steve Posted on 2001-02-02 11:11:03.0Z
From: steve@fireball.co.uk
Date: Fri, 2 Feb 2001 06:11:03 -0500
Newsgroups: sybase.public.sqlserver.nt
Subject: Re: Problems with identity fields in Sybase 11.5. Please help
Message-ID: <6F6EDAC733084AD3003D6FE3852569E7.0065132C852568BF@webforums>
References: <dkhJHcKp$GA.212@forums.sybase.com>
Lines: 7
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.sqlserver.nt:1255
Article PK: 1088715

I had exactly the same problem and fixed the problem by using the CONVERT
function and this seemed to work when converting to int or varchar, but not
when I converted it to the same data type as the field, which was
numeric(4,0).

eg. CONVERT(varchar(8),identity_field)

Steve