db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Scott <deni...@gmail.com>
Subject Re: Has anyone tried to write a C app and connect to Derby?
Date Fri, 04 Nov 2005 20:48:19 GMT
Yes, I used the DB2 CLI driver -- there's really no difference between
programming for DB2 CLI versus programming for ODBC. The DB2
Information Center
(http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/ad/r0000553.htm)
documents the CLI API pretty well.

Most of the work I have done has been on Linux. To compile a CLI/ODBC
app you need the headers shipped with the DB2 Application Development
Client (free download from
http://ibm.com/db2/udb/support/downloadv8.html).

The primary reason I have been going this route was so I could help
develop and test the ibm_db2 extension for PHP against Derby as well
as against DB2. Works quite nicely, if I do say so myself...

Dan
(Shameless plug / full disclosure section: I contributed some chapters
on using Derby as a network server with Perl, PHP, and Python to the
newly released "Apache Derby: Off to the Races" book from IBM Press
and I occasionally write about my experiences with Derby, DB2, PHP,
and various other things on my blog at http://coffeecode.net.)


On 11/4/05, Michael Segel <msegel@segel.com> wrote:
> On Friday 04 November 2005 08:25, you wrote:
> Thanks,
>
> That was what I was looking for.
> I'm more interested in the CLI programs.
>
> Since CLI is a generic term, which library set are you using?
> I'm going to assume DB2. If so, which driver did you use?
>
> I think that this is definitely an under exploited use of Derby.
>
> Since Derby is released under Apache, there is a lot of freedom with
> minimal/no risk in use, and no additional cost.
>
> IMHO, this makes it a real competitor in the SMB marketplace.
>
> Thx,
>
> -G
>
> > Yep, I've written ODBC and CLI programs that connect to Derby via the
> > network server.
> >
> > It's not really odd at all. In fact, that's how PHP, Perl, Python, etc
> > all connect to Derby -- the corresponding DB2 driver they rely on is
> > basically a C application. You just approach Derby as a regular
> > database server that just happens to be written in Java, rather than a
> > Java application that happens to be a database server.
> >
> > Dan
> >
> > On 11/4/05, Nicolas Dufour <nicolas.dufour@neometsys.fr> wrote:
> > > Michael Segel wrote:
> > > > While this seems weird, there is a serious reason behind this.
> > > >
> > > > I wouldn't expect anyone to embed Derby in to a C app, however, with
> > > > the network interface/framework... Well you get the idea.
> > > >
> > > > -G
> > >
> > > Hello Michael
> > >
> > > My java program has parts in C and access to derby from C but with the
> > > help of java methods using JNI.
> > > It seems the only solution ...
> > >
> > > Nicolas
>
> --
> Michael Segel
> Principal
> MSCC
>

Mime
View raw message