3 Sep 2006 (Sun)

18:00:29 # Life Battle against using SQL from C. I thought standards are good, but most of the times they are ugly. About the only good reference on ODBC is available from Microsoft, and this standard allows you to enjoy programming at a Win32-API level. It gives you a k00l h4X0r factor equal to kernel programming, really. I coded up some kind of sample implementation for doing some SQL select, and insert, but this is too bad. I don't think I can stand it. And then I looked at odbc++, and found out that it doesn't even build. 385801. There seems to be some discrepancy around ODBC spec. Grmbl. Nobody using SQL from C or C++ these days?

I received a suggestion to use libpqxx. Which sounds nice. OTL looks promising with regards to cross-database tool for C++, but not sure about its licensing since it predates most of open source woes. It should really be possible to do a select * from table and map the result to an array of struct with decent types if a schema is given. It might just be too difficult for statically typed language, I suppose.

Junichi Uekawa

$Id: dancer-diary.el,v 1.91 2006/06/15 15:14:10 dancer Exp $