Re: When will there by official support for ODBC in C++?
On 3 Jan, 23:13, Nicola Musatti <nicola.musa...@gmail.com> wrote:
On Dec 18 2007, 5:15 pm, ap...@student.open.ac.uk wrote:
[...]
When will ODBC support be an official part of C++?
Well, you have at least two options: you might team up with the SOCI
people (http://soci.sourceforge.net/), help them get SOCI accepted
into Boost and write a proposal to put before the committee; or you
might help *me* :-) with my own SqlCli effort
(seehttp://www.boost-consulting.com/vault/index.php?directory=Databaseandhtt
p://wthwdik.wordpress.com/category/sqlcli/).
Thanks for pointing out these projects. Actually I was already aware
of SOCI but did not know of your one. SqlCli seems to be like it has
quite a long way to go yet (further than SOCI). And both seem to
require the coder to state in the code which database backend is being
used. One of the great things about JDBC is that it manages to avoid
this.
I realise that this sort of thing is tricky in C++. Rogue Wave
attempted it with DBTools++ but did so via a horrible hack where you
have to call a RW routine at the start that loads a DBTools++ dynamic
library for the DB backend required. Dynamic library loading is much
easier in java (this is the subject of another thread in this NG). But
it can be done in C++. ACE does it.
You post made me take a fresh look at SOCI and I must admit, it seems
very nice. But it is not a ODBC type interface. And there are already
several non-ODBC database libraries available in C++. My favourite is
OTL, http://otl.sourceforge.net. That's nice too. And it has support
for sybase which SOCI does not at the moment. Perhaps SOCI is better
or will be better than OTL in the longer term since it has been
blessed by Boost, but I am not sure. I know boost libraries are
closely related to efforts to stdize future libraries and this is all
very good, but there already is a std for interfacing to databases:
ODBC. I wonder what there is in boost to offer an ODBC-style
interface. I suspect there is nothing and that SOCI is the main
database library in boost. Perhaps boost developers can comment on
this?
Regards,
Andrew Marlow
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]