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.

ODBC errors after converting varbinary column to varchar

2 posts in Windows NT Last posting was on 2000-10-30 18:22:14.0Z
a_dux Posted on 2000-10-17 21:56:41.0Z
From: a_dux@excite.com
Date: Tue, 17 Oct 2000 17:56:41 -0400
Newsgroups: sybase.public.sqlserver.nt
Subject: ODBC errors after converting varbinary column to varchar
Message-ID: <6A6607C0EAF46FD200788BC28525697B.00788BD08525697B@webforums>
Lines: 21
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:1562
Article PK: 1089038

I am using ASE 11.9.2 for NT. I am relatively up to date on patches,
although not completely. I use the ODBC drivers to access the tables
through MS Access and some C++ programs.

The problem is that I have a table that was created with a number of
varbinary columns and wanted to switch some of them to varchar. After the
switch, I get strange behavior after adding a row and then trying to update
the row--the update always fails with an error. Access reports "another
user modified the record while you were editing" (no locks setting in
options). My C++ programs, which are attempting to do an "UPDATE ... WHERE
CURRENT" after a successful "SELECT ... FOR UPDATE", get the generic ODBC
error "no records were affected".

By process of elimination, I determind that the errors spontaneously go
away when I change one specific varchar(16) back to a varbinary(16). This
column is not involved in any indexes, constraints, triggers, etc. This is
a completely plain vanilla table.

Anyone have any clues or similar experiences?

Mike Johnson
a_dux@excite.com


Anonymous Posted on 2000-10-30 18:22:14.0Z
From: Anonymous@sybase.com
Date: Mon, 30 Oct 2000 13:22:14 -0500
Newsgroups: sybase.public.sqlserver.nt
Subject: answered my own question
Message-ID: <A8310FED38BF826F0064E99785256988.0049BAE98525697D@webforums>
References: <6A6607C0EAF46FD200788BC28525697B.00788BD08525697B@webforums>
Lines: 2
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:1538
Article PK: 1089014

Passed a zero-length string (single null byte) to ODBC and set the width
value to 1. Messes up ODBC bigtime.