From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: using orgtbl-sqlinsert Date: Wed, 25 Sep 2013 09:29:17 +0700 Message-ID: <874n99zlaa.fsf@ericabrahamsen.net> References: <87obbyut4n.fsf@ericabrahamsen.net> <2C4DFA4F-3950-42D8-BFC5-D588078C3DB7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOeq3-0006tQ-85 for emacs-orgmode@gnu.org; Tue, 24 Sep 2013 22:28:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VOepy-0000X3-OU for emacs-orgmode@gnu.org; Tue, 24 Sep 2013 22:28:27 -0400 Received: from plane.gmane.org ([80.91.229.3]:48023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VOepy-0000Wx-Hi for emacs-orgmode@gnu.org; Tue, 24 Sep 2013 22:28:22 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VOepx-00030s-FJ for emacs-orgmode@gnu.org; Wed, 25 Sep 2013 04:28:21 +0200 Received: from 202.153.224.243 ([202.153.224.243]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Sep 2013 04:28:21 +0200 Received: from eric by 202.153.224.243 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Sep 2013 04:28:21 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Carsten Dominik writes: > Hi Eric, > > do you have orgtbl-to-sqlite defined? What does it look like? > Do you have the BEGIN RECEIVE and END RECEIVE lines in the buffer? > Are you working in a buffer that is not in Org-mode? Do you have orgtbl-mode turned on? Hi Carsten, I later replied to that thread (at least, I think it should have been part of the same thread) with a patch to orgtbl-to-sqlite. Bastien applied it, and to my knowledge all is well. As Jason mentioned, this and I guess the other orgtbl-* functions seem sort of out of date at this point (should they all be replaced with Babel?), but the problem I brought up here, at least, is fixed. Thanks! Eric > On 26.5.2013, at 08:56, Eric Abrahamsen wrote: > >> I've got a table I'm trying to insert into a sqlite database. I've been >> looking at orgtbl-sqlinsert and this page[fn:1], but I suspect all that >> is out of date. I haven't seen anyone talking about #+ORGTBL: keywords, >> or things like "#+BEGIN RECEIVE ORGTBL exsql" in the past year or so. >> >> Do those still work? I can't for the life of me get it to do anything. >> I've got a sqlite database called "market.sqlite" in the same directory >> as a file containing this: >> >> #+TBLNAME: terms >> #+ORGTBL: SEND market.sqlite orgtbl-to-sqlinsert :sqlname "terms" >> | Chinese | English | >> |------------------+------------------------------------| >> | 音像制品出版 | A/V Publishing | >> | 定价总金额 | Aggregate Retail Price | >> (etc) >> >> I've tried C-c C-c on that header, calling >> `org-babel-execute-src-block', waving my fingers at it, and cursing >> loudly, one of which usually works. But I get no error, no insertion >> into the database, and no results block with INSERT statements (I tried >> making a #+BEGIN RECEIVE ORGTBL marketdb.sqlite block as noted on worg). >> >> Does this still work? Or is it still possible to jimmy orgtbl-sqlinsert >> to either insert directly, or create a block of INSERT statements? >> >> Thanks! >> >> Footnotes: >> >> [fn:1] http://orgmode.org/worg/org-tutorials/multitarget-tables.html >> >>