jplindstrom (594)

Sybase weirdness

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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.