about photos bookshelf portfolio blog home
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 | Comments (0)

XML

Blog Categories

software (4)
  ..heads up 'tunes (4)

Notifications

Icon of Envelope Request notifications

Syndication Feed

XML

Recent Comments

  1. Mark Aufflick: all good ideas
  2. Unregistered Visitor: Excellent!
  3. Mark Aufflick: Hey thanks
  4. Unregistered Visitor: Fantastic entry
  5. Mark Aufflick: Bah - dashboard widgets
  6. Unregistered Visitor: Nice
  7. Mark Aufflick: elegant maths (as opposed to elegant rabbit)
  8. Unregistered Visitor: Does that really matter?
  9. Mark Aufflick: Inspiration
  10. Unregistered Visitor: Perhaps...