Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 92482 invoked from network); 4 Nov 2005 20:48:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Nov 2005 20:48:44 -0000 Received: (qmail 22114 invoked by uid 500); 4 Nov 2005 20:48:43 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 21770 invoked by uid 500); 4 Nov 2005 20:48:43 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 21759 invoked by uid 99); 4 Nov 2005 20:48:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2005 12:48:42 -0800 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of denials@gmail.com designates 66.249.82.194 as permitted sender) Received: from [66.249.82.194] (HELO xproxy.gmail.com) (66.249.82.194) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2005 12:48:37 -0800 Received: by xproxy.gmail.com with SMTP id t15so275338wxc for ; Fri, 04 Nov 2005 12:48:21 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gBvKLDKPp5pSBWxeU4kWqXuJ0CNAMIWvKUHJOaxtK2Fd1L97gkg7LLXxaijykzRNhihNC4yMxTvz8erkpfa1I9AD9jvlQihJEaIIvrRf5dQem4SSbwsk50P/BxOFFcVb+9rtsrqc1Ef8pLEeO7ByZJ0rGUElVpxhP424jC8S0Ys= Received: by 10.65.235.11 with SMTP id m11mr2576878qbr; Fri, 04 Nov 2005 12:48:20 -0800 (PST) Received: by 10.64.249.15 with HTTP; Fri, 4 Nov 2005 12:48:19 -0800 (PST) Message-ID: Date: Fri, 4 Nov 2005 15:48:19 -0500 From: Dan Scott To: Derby Discussion Subject: Re: Has anyone tried to write a C app and connect to Derby? In-Reply-To: <200511041025.55359.msegel@segel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43694B82.3000809@debrunners.com> <436B590E.7060500@neometsys.fr> <200511041025.55359.msegel@segel.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 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 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, wit= h > > > > 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 th= e > > > help of java methods using JNI. > > > It seems the only solution ... > > > > > > Nicolas > > -- > Michael Segel > Principal > MSCC >