Re: [sqlite] Peculiar activity in an SQLite-using InDesign plug-in on the Macintosh

2011-08-05 Thread Simon Slavin
On 5 Aug 2011, at 4:34pm, john darnell wrote: > The problem is resolved. It turns out that I was calling a function to > save data to a child table. That function had a prepare statement that had > never been finalized. > > Though it's embarrassing to admit my dumb mistakes, I kinda fe

Re: [sqlite] Peculiar activity in an SQLite-using InDesign plug-in on the Macintosh

2011-08-05 Thread john darnell
> > Thanks for what help you gave. It pointed me in the right direction, I think. Simon: The problem is resolved. It turns out that I was calling a function to save data to a child table. That function had a prepare statement that had never been finalized. Though it's embarrassing

Re: [sqlite] Peculiar activity in an SQLite-using InDesign plug-in on the Macintosh

2011-08-05 Thread john darnell
> > Not that I think they're the problem, but just for completeness, do some error > reporting on _initialize and _open and _prepare too. > > Simon. Sigh. I removed the error checking from the email because I am of the same opinion, and because I wanted to provide as simple a piece of code as

Re: [sqlite] Peculiar activity in an SQLite-using InDesign plug-in on the Macintosh

2011-08-04 Thread Simon Slavin
On 5 Aug 2011, at 1:05am, john darnell wrote: > As a matter of fact, Simon, for some reason, whenever I call it in this > particular function (and I call this function a lot), it returns an error. > The error is (both surprisingly and unsurprisingly) "unable to close due to > unfinalized stat

Re: [sqlite] Peculiar activity in an SQLite-using InDesign plug-in on the Macintosh

2011-08-04 Thread john darnell
> Can you > make absolutely sure sqlite3_close() has been called correctly and does not > return > an error ? As a matter of fact, Simon, for some reason, whenever I call it in this particular function (and I call this function a lot), it returns an error. The error is (both surprisingly and u

Re: [sqlite] Peculiar activity in an SQLite-using InDesign plug-in on the Macintosh

2011-08-04 Thread Simon Slavin
On 4 Aug 2011, at 11:02pm, john darnell wrote: > The documentation says that when I close a database transactions in progress > are rolled back, but I cannot find a way of testing for whether a transaction > is completed. SQLite does not do any tasks in the background. There's no need to paus

Re: [sqlite] Peculiar activity in an SQLite-using InDesign plug-in on the Macintosh

2011-08-04 Thread john darnell
> > I'm not sure where you close your database handle, and what you mean by 'end > of > a run', but when you have used sqlite3_close() to close all handles to a > SQLite > database that file should no longer exist. If you still have a file with > that name on > your disk, something has gone wr

Re: [sqlite] Peculiar activity in an SQLite-using InDesign plug-in on the Macintosh

2011-08-04 Thread Simon Slavin
On 4 Aug 2011, at 8:28pm, john darnell wrote: > The name of the DB file I use is IndexData.db. On certain versions (but not > all versions) of the plugin, during the processing, an IndexData.db-Journal > file is created. It is always empty at the end of a run. I'm not sure where you close you

[sqlite] Peculiar activity in an SQLite-using InDesign plug-in on the Macintosh

2011-08-04 Thread john darnell
Hello people. I apologize for the vagueness of this email, but all I can really hope for is some ideas to pursue, I think. I have an InDesign plug-in that scans numerous InDesign documents (there are no limits, but a common number would be around 100) for certain names and stores that informat