Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jplindstrom (594)

jplindstrom
  (email not shown publicly)

Journal of jplindstrom (594)

Tuesday June 03, 2003
05:22 PM

Sybase weirdness

[ #12599 ]

There is this annyoing weirdness in Sybase. Better to have it read by people and spidered by Google than not, so here it is.

If you, in a stored procedure, have an output parameter of type bit and it doesn't have a value (it may be passed in with a NULL value) when the procedure returns, the ct-lib on the client will crash due to faulty TDS data.

This can happen if e.g. a foreign key constraint is violated and an error is raised before you touch the variable.

The solution is to make sure the variable always has a proper bit-like value, so put

select @is_weird = 1

at the beginning of the procedure before anyhing can go wrong.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • So what's the Sybase version? Just in case someone comes here from Google sometime...
  • ASE 12.5 + the 12.5 Open Client (Windows). Open Client is of course installed on top of the 11.9.2 version since they stopped shipping SQL Advantage and a proper Sybase Central way back.