From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jason haslup Newsgroups: gmane.emacs.help Subject: Re: Building a database interface in Emacs Date: Wed, 20 Dec 2006 19:49:10 +0000 (UTC) Message-ID: References: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1166644540 17831 80.91.229.10 (20 Dec 2006 19:55:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Dec 2006 19:55:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 20 20:55:39 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gx7XL-0005q9-5k for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Dec 2006 20:55:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gx7XK-0004bi-Qn for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Dec 2006 14:55:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gx7Wz-0004VT-Vi for help-gnu-emacs@gnu.org; Wed, 20 Dec 2006 14:55:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gx7Wy-0004UT-S4 for help-gnu-emacs@gnu.org; Wed, 20 Dec 2006 14:55:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gx7Wy-0004UF-Iv for help-gnu-emacs@gnu.org; Wed, 20 Dec 2006 14:55:12 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gx7Wv-0002hg-Q7 for help-gnu-emacs@gnu.org; Wed, 20 Dec 2006 14:55:10 -0500 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1Gx7Wo-00077T-G7 for help-gnu-emacs@gnu.org; Wed, 20 Dec 2006 20:55:02 +0100 Original-Received: from ip-64-202-160-161.secureserver.net ([ip-64-202-160-161.secureserver.net]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Dec 2006 20:55:02 +0100 Original-Received: from jason by ip-64-202-160-161.secureserver.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 20 Dec 2006 20:55:02 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 29 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 64.202.160.161 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:39781 Archived-At: Mathias Dahl gmail.com> writes: > > I have been looking into using Emacs for doing queries etc against an > Oracle database, for certain work purposes. I use the nice functions ... > What would be the best approach for doing this? First I tried adding > something on top of sql.el and comint.el but it seemed overkill as I > am not interested in a command line interface. My current plan is to > use `start-process' to start sqlplus in a process, and to send input > and parse the output I get back from that process. > > Is there any smarter way of doing it? I did something using comint's filter functions, but it requires having a *SQL* buffer open to the database you're interested in: http://www.haslup.com/index.cgi/emacs/2006/12/20/ I'm not too familiar with sqlplus, but I know the mysql client has a raw mode and also an XML mode for queries that might help in looking for the end of a query's results. Or, if sqlplus doesn't work, I wonder if a simple helper client using oracle's libraries would be something you could use with start-process. Then you could have complete control over the output of the data? jason