From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12948 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: LaTeXDB equivalent for ConTeXt ? Date: Thu, 21 Aug 2003 23:37:35 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <5.2.0.9.1.20030821233546.012afd50@server-1> References: <1061379374.23522.7.camel@JBC.yorkref.com> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: sea.gmane.org 1061504395 25290 80.91.224.253 (21 Aug 2003 22:19:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2003 22:19:55 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Fri Aug 22 00:19:53 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19pxmb-00063o-00 for ; Fri, 22 Aug 2003 00:19:53 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 9E17110B2B; Fri, 22 Aug 2003 00:19:49 +0200 (MEST) Original-Received: from mail.solcon.net (mail.solcon.net [212.45.33.5]) by ref.ntg.nl (Postfix) with ESMTP id 111C310B2B for ; Fri, 22 Aug 2003 00:12:25 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mail.solcon.net (8.11.6/8.9.3) with ESMTP id h7LMCDc24948 for ; Fri, 22 Aug 2003 00:12:13 +0200 Original-Received: from laptop-3.wxs.nl (laptop-3.pragma-net [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id 315EC219CB for ; Fri, 22 Aug 2003 00:12:18 +0200 (CEST) X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Original-To: ntg-context@ntg.nl In-Reply-To: <1061379374.23522.7.camel@JBC.yorkref.com> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:12948 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12948 At 13:36 20/08/2003 +0200, you wrote: >Hi, > >Is there anything like LaTeXDB: > > > >in ConTeXt? > >The short story is that LaTeXDB makes it possible to include SQL queries >in a LaTeX document. I have played with the following code: % interface=en output=pdftex \unprotect \definesystemvariable{sq} \def\startSQLquery#1#2\stopSQLquery {\setvalue{\??sq:#1}{#2}} \def\applySQLquery#1% last line is quit without ; {\bgroup \def\\{\rawcharacter{`\\}}% \long\def\next##1;##2% {\ifx##2\empty \immediate\write\scratchwrite{##1}% \@EA\gobbleuntil\@EA\relax \else \immediate\write\scratchwrite{##1;}% \@EA\next \fi##2}% \immediate\openout\scratchwrite=\bufferprefix\jobname-sql.sql \@EAEAEA\next\csname\??sq:#1\endcsname\empty\empty;\empty\relax \immediate\closeout\scratchwrite \executeSQLcommand {\bufferprefix\jobname-sql.sql}% {\bufferprefix\jobname-sql.log}% \egroup} \def\executeSQLcommand#1#2% % {\executesystemcommand{c:/mysql/bin/mysql.exe < #1 > #2}} {\executesystemcommand{c:/mysql/bin/mysqldump.exe -r #2 < #1}} \protect % \endinput \starttext \startSQLquery{test} connect cod ; % select leerling into outfile "e:/tmp/test.tmp" from ws_p ; %select data into outfile "e:/tmp/test.tmp" select data from ws_p ; quit \stopSQLquery \applySQLquery{test} \typefile{e:/tmp/test.tmp} \stoptext t There have been discussions of extending the (fptex) url input file support with something that could talk to ports (services) ... maybe its time to pick up that thread. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------