Begin main content

Sybase, it's Californian for ****

In my del.icio.us inbox I found a quite useful sybase-specific blog:

http://sybasease.blogspot.com/

It contains actually useful info and discussion (unlike 99% of the other Sybase sites on the net). Unsurprisingly, the first page already contains info on two blatant mysql-esque violations of the ANSI standard that make your code more dangerous and less portable:

http://sybasease.blogspot.com/2005/09/string-truncation.html

Yes, Sybase silently truncates if you try to insert a string that is too long for the field. Handy.

http://sybasease.blogspot.com/2005/05/nulls-in-sybase-ase.html

A NULL is a NULL, unless it's a Sybase NULL (or a mysql NULL for that matter). NULL = NULL should be false right? Well in a Sybase where clause, it's true. As if that weren't bad enough, Sybase is not even self-consistent: In join clauses NULL = NULL will not match ie. is false. GAH!

In both cases there are runtime options you can specify to trigger more ANSI-ish behaviour. If I was designing coding standards for a team I would enforce these settings in all code at the point of instantiating a db connection.

12:48 AM, 27 Mar 2006 by Mark Aufflick Permalink | Short Link

Add comment