Source code from blog post : http://lostinmac.com/2013/06/23/sybase-et-le-c-2eme-partie-embedded-sql/