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 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

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

[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

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
Thanks for your kind words, Simon. As for myself, I really do strive for civility, though I don't always get there. I'll keep working at it if you promise to be patient with me. As for "top-posting," In the corporate culture I come from, it is considered the only way to do things (or at

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
s-boun...@sqlite.org] > On Behalf Of Warren Young > Sent: Friday, June 17, 2011 7:00 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] OSX path > > On 6/17/2011 4:50 PM, john darnell wrote: > > > > I am essentially a Windows programmer > >

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
SQLite Database > Subject: Re: [sqlite] OSX path > > > On 17 Jun 2011, at 10:09pm, john darnell wrote: > > > I checked two references and neither one of them mentioned this teensy > > little > requirement. I guess they must've thought it wasn't important. > >

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
sqlite-users-boun...@sqlite.org] > On Behalf Of Doug Currie > Sent: Friday, June 17, 2011 4:07 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] OSX path > > > On Jun 17, 2011, at 2:56 PM, john darnell wrote: > > > I am attempting to open an

Re: [sqlite] Opening a database on a Mac

2011-06-17 Thread john darnell
: [sqlite] Opening a database on a Mac > > >   strcpy(DBEnginePath, "Macintosh HD:Applications:Adobe InDesign CS5:Plug- > Ins:WPC_ID:IndexData.db"); > > Try to change path here to "/Applications/Adobe InDesign > CS5/Plug-Ins/WPC_ID/IndexData.db". > &g

[sqlite] (no subject)

2011-06-17 Thread john darnell
I am attempting to open an SQLite database on the Mac (OSX Snow Leopard) and am getting an error. This is the code I am using: char DBEnginePath[1000]; strcpy(DBEnginePath, "Macintosh HD:Applications:Adobe InDesign CS5:Plug-Ins:WPC_ID:IndexData.db"); fprintf(stderr, "%s\n",

[sqlite] Opening a database on a Mac

2011-06-17 Thread john darnell
Sorry to send this twice, but I realized that my first transmission did not include a subject line. _ From: john darnell Sent: Friday, June 17, 2011 1:56 PM To: 'General Discussion of SQLite Database' Subject: I am attempting to open an SQLite

Re: [sqlite] Unlocking the database

2011-05-28 Thread john darnell
/28/11, Simon Slavin <slav...@bigfraud.org> wrote: > > > From: Simon Slavin <slav...@bigfraud.org> > > Subject: Re: [sqlite] Unlocking the database > > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > > Date: Saturday, May 28

Re: [sqlite] Unlocking the database

2011-05-28 Thread john darnell
011 11:29 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Unlocking the database > > On Sat, May 28, 2011 at 12:25 PM, john darnell > <john.darn...@walsworth.com>wrote: > > > I tried rebooting the machine and it did not unlock the table. > > &

Re: [sqlite] Unlocking the database

2011-05-28 Thread john darnell
> Hash: SHA1 > > On 05/28/2011 09:02 AM, john darnell wrote: > > Is there a function, method or process whereby I can unlock the database > > when > it gets locked? > > It is locked by another connection or process and you can't ask them to give > up locks using

[sqlite] Unlocking the database

2011-05-28 Thread john darnell
Hello folks. This time I have (I hope) a much simpler question. While debugging my code, I managed to lock the database for all time. The only way I was able to unlock the database was by retrieving a copy of the database I had tucked away for just such contingencies. I looked in Jay

Re: [sqlite] SQLite in Xcode

2011-05-27 Thread john darnell
Tom: Thanks for the information and I will be looking at the slideshow soon. This project was an InDesign plugin project, which, by agreement when I use the SDK, is a C++ project. I could probably fit in all of the Objective-C code you suggest, but (okay, this is a whine) the InDesign

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
One final message on this topic. In my last message I mentioned four warnings remaining when I compile the file. I decided to at least look at them in situ and see what they were. It turned out that it took very little to fix them AFAIK. Here is what I did: > > Warning: declaration of

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
resolve this difficult problem. R, John > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Simon Slavin > Sent: Thursday, May 26, 2011 2:13 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SQLit

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
quot; to "char *" > >        This error was marked at line 13726. > > IIRC, this error is the most famous difference between C and C++. And > if this error appears then you are compiling it as C++, not as C. > > > Pavel > > > On Thu, May 26, 2011

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
> > I'm not sure what .dylib you're using. The standard installation of OS X > with the > Developer tools has sqlite header files in > > /usr/include/sqlite3.h > > and > > /Developer/SDKs/MacOSX10.6.sdk/usr/include/sqlite3.h > > which may or may not be identical to each-other. > >

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Simon Slavin > Sent: Thursday, May 26, 2011 12:38 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SQLite in Xcode > One thing that occurs to me is

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
Mr. Slavin, here's the information you requested: Please note that I am working in Xcode 3.1.3. That may or may not be part/all of the problem. > -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Simon Slavin > Sent:

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
> On 26 mai 2011, at 16:49, john darnell wrote: > > > > > Since then I have tried using the sqlite.dylib file that comes with OSX but > > in > doing so, some important SQLite functions (such as the prepare function) were > not found during the link process. >

[sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
Hello everyone. I am still trying to get SQLite to work on my Mac. I want to make sure I am doing what I should be doing. Here are the steps I have taken: 1.) I downloaded and uncompressed sqlite-autoconf-3070602.tar.gz from the SQLite download page. 2.) I moved SQLite3.c and

Re: [sqlite] Compiling in Xcode 3.1.3

2011-05-16 Thread john darnell
ing in Xcode 3.1.3 > > > On 16 May 2011, at 10:09pm, john darnell wrote: > > > I highlighted the file, clicked the information icon and then under the > > "General" > category I changed the type of file from "sourcecode.c.c" to "sourcecode.c." &

Re: [sqlite] Compiling in Xcode 3.1.3

2011-05-16 Thread john darnell
age- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of john darnell > Sent: Monday, May 16, 2011 4:09 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Compiling in Xcode 3.1.3 > > Thanks again. > > I

Re: [sqlite] Compiling in Xcode 3.1.3

2011-05-16 Thread john darnell
] > On Behalf Of Richard Hipp > Sent: Monday, May 16, 2011 3:45 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Compiling in Xcode 3.1.3 > > On Mon, May 16, 2011 at 4:31 PM, john darnell > <john.darn...@walsworth.com>wrote: > > > Thanks for re

Re: [sqlite] Compiling in Xcode 3.1.3

2011-05-16 Thread john darnell
eral Discussion of SQLite Database > Subject: Re: [sqlite] Compiling in Xcode 3.1.3 > > On Mon, May 16, 2011 at 4:01 PM, john darnell > <john.darn...@walsworth.com>wrote: > > > I have code that compiles just fine using Visual Studio 8 on Windows XP, > > but when I port

[sqlite] Compiling in Xcode 3.1.3

2011-05-16 Thread john darnell
I have code that compiles just fine using Visual Studio 8 on Windows XP, but when I port SQLite over to a Mac OSX (Snow Leopard) platform using Xcode 3.1.3 I get roughly 1000 errors based upon SQLite. Is there something I need to turn off/on when using SQLite on the Mac? R, John A.M.

[sqlite] using sqlite3_get_table --additional info...

2011-03-31 Thread john darnell
BTW, if there is a better way to get a row count without using sqlite3_get_table() that would also work. _ From: john darnell Sent: Thursday, March 31, 2011 9:27 AM To: 'General Discussion of SQLite Database' Subject: using sqlite3_get_table All I

[sqlite] using sqlite3_get_table

2011-03-31 Thread john darnell
All I need to do is see how many rows a table has. I stumbled across this function and used it thusly in my code (I removed the error checking for the sake of brevity): Result = sqlite3_initialize(); sqlite3 *db_ptr; Result = 0; Result = sqlite3_open_v2(DBEnginePath, _ptr,

Re: [sqlite] Getting a table's field labels with Perl, DBI

2011-01-25 Thread john darnell
Hello John Delacour...nice to see you join the SCLite list. Folks, John may be a SCLite beginner, but he has quite a reputation on the MacScript list. I personally am glad to see him here. R, John > -Original Message- > From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Troubleshooting...

2010-12-20 Thread john darnell
010 12:10 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Troubleshooting... > > On 12/17/2010 6:18 PM, john darnell wrote: > > Here's that statement from my code again with the mods included that make > > the > code work: > > > >char *surbuf[100]; &

[sqlite] FW: Troubleshooting...

2010-12-20 Thread john darnell
ables.txt sqlite> select * from Names; ( It was this field) V 1||µàäµ╣▓µ▒Ñ|JohnDarnell, John||0|1|0 2||µàäµ╣▓µ▒Ñ|John|A|M||Darnell, John A M||0|1|0 3||µòäµà¼µò«|PatrickDelaney, Patrick||0|1|0 4||µàìµ╜│Γ╡«µàäµ╣▓µ▒Ñ|ToddMason-Darnell, Todd||0| 5||Θëŵ╜äµæ╖|WilliamOÆDowd, Wi

Re: [sqlite] Troubleshooting...

2010-12-20 Thread john darnell
Thank you for the reminder, Mr. Archer. The basic_string is actually stored as part of a STL map and is fairly long-lived; once it is created, it remains until the plugin's destructor clears the map. R, John > -Original Message- > From: sqlite-users-boun...@sqlite.org

Re: [sqlite] Troubleshooting...

2010-12-20 Thread john darnell
().c_str()); > > Don't do this in production application as it can overflow your surbuf > (if GetSurName() returns something that is longer than 100 bytes). > Apart from that this statement and call to strlen() further do nothing > different than SQLite does by itself when you provide to it sim

Re: [sqlite] Troubleshooting...

2010-12-17 Thread john darnell
Okay. I worked out a solution, but I am still unsure of why it fixes the problem. Or rather, I know why it works, but it still doesn't explain why the basic_string::c_str() call did not work. My only guess is that basic_string::c_str() doesn't really provide a pointer to a null-terminated

Re: [sqlite] Troubleshooting...

2010-12-17 Thread john darnell
statement as last argument when > you start sqlite3 utility and use standard redirection like this: > > sqlite3 database.db "select * from mytable" >output.txt > > > Pavel > > On Fri, Dec 17, 2010 at 5:23 PM, john darnell > <john.darn...@walsworth.com> wrote: &g

Re: [sqlite] Troubleshooting...

2010-12-17 Thread john darnell
or browser. They can understand UTF-8 encoding pretty > well. > > > Pavel > > On Thu, Dec 16, 2010 at 4:47 PM, john darnell > <john.darn...@walsworth.com> wrote: > > > > > >> -Original Message- > >> From: sqlite-users-boun...@sqli

Re: [sqlite] Troubleshooting...

2010-12-17 Thread john darnell
ad or browser. They can understand UTF-8 encoding pretty > well. > > > Pavel > > On Thu, Dec 16, 2010 at 4:47 PM, john darnell > <john.darn...@walsworth.com> wrote: > > > > > >> -Original Message- > >> From: sqlite-users-boun...@sqlite

Re: [sqlite] beginner

2010-12-17 Thread john darnell
r 17, 2010 9:01 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] beginner > > On Fri, Dec 17, 2010 at 08:42:54AM -0600, john darnell scratched on the wall: > > > I am learning SQLite based on the O'Reilly book by Jay Kreibich, > > called &q

Re: [sqlite] beginner

2010-12-17 Thread john darnell
Hello Srindhi: From one SQLite beginner to another... SQLite and SQL are two different subjects. So you need to clarify for yourself what you want to do. Do you want to learn SQL? Then there are a number of good books you can get from Amazon to help you learn, and there are a number

Re: [sqlite] Troubleshooting...

2010-12-16 Thread john darnell
s is that they are integer while the rest is text. R, John > > On Thu, Dec 16, 2010 at 3:35 PM, john darnell > <john.darn...@walsworth.com> wrote: > > IAW the SQLite book I purchased, I  have incorporated data binding into my > “INSERT” statements, but neither of the two mos

[sqlite] Troubleshooting...

2010-12-16 Thread john darnell
IAW the SQLite book I purchased, I have incorporated data binding into my “INSERT” statements, but neither of the two most important statements are working…or rather, the first adds a record to the table, but it is mostly junk, looking like this: 4851||x|x|x||2|3|1|10

Re: [sqlite] SQLite Documentation v2

2010-12-10 Thread john darnell
> Indeed, Windows Explorer. > > Please investigate the options in the popup menu (maybe you should > choose "Properties" first and then look in the dialog box... I'm not > sure). It has to be there :) > > -- > Regards, > Serge Igitov Thanks, Serge. That worked. R, john

Re: [sqlite] SQLite Documentation v2

2010-12-10 Thread john darnell
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Dagdamor > Sent: Friday, December 10, 2010 12:04 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] SQLite Documentation v2 > > Artur Reilin

Re: [sqlite] enums

2010-12-07 Thread john darnell
> -Original Message- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] > On Behalf Of Dagdamor > Sent: Tuesday, December 07, 2010 12:46 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] enums > >

Re: [sqlite] enums

2010-12-07 Thread john darnell
qlite] enums > > On Tue, Dec 7, 2010 at 8:38 PM, john darnell > <john.darn...@walsworth.com>wrote: > > > Is there any way to build an SQLite table that recognizes enums? > > > > Hmm, I always thought that this is better to be implemented by a separate > tabl

[sqlite] enums

2010-12-07 Thread john darnell
Is there any way to build an SQLite table that recognizes enums? It's a lot easier to understand at data that looks like this: kHard kSoft kAlt kSoft kSoft kHard than this: 1 2 3 2 2 1 R, John A.M. Darnell Senior Programmer Walsworth Publishing Company Brookfield, MO John may also be reached

[sqlite] creating a database

2010-11-30 Thread john darnell
Okay, I seem to have figured it out. One needs to create the database and then add a table before the database will be created. Sorry for the baby steps. R, John A.M. Darnell Senior Programmer Walsworth Publishing Company Brookfield, MO John may also be reached at

[sqlite] Creating a database.

2010-11-30 Thread john darnell
I know this is a fundamental question, but in the book I'm using to learn SQLite, there is no reference that I can find for what one needs to do to create a database. I thought that simply using a CREATE statement with a database name included might do the trick, but alas it does not. I went

Re: [sqlite] Just compiled SQLite in Visual Studio

2010-11-30 Thread john darnell
Thanks Igor. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Igor Tandetnik Sent: Monday, November 29, 2010 7:11 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Just compiled SQLite in Visual Studio john darnell

Re: [sqlite] Just compiled SQLite in Visual Studio

2010-11-29 Thread john darnell
On Behalf Of Simon Slavin > Sent: Monday, November 29, 2010 5:39 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Just compiled SQLite in Visual Studio > > > On 29 Nov 2010, at 11:10pm, john darnell wrote: > > > here's that first dumb-soundi

[sqlite] Just compiled SQLite in Visual Studio

2010-11-29 Thread john darnell
Hello Folks: I just started a big project that needed an internal database manager and SQLite looks like it will fit the bill. I am old hat with SQL but have absolutely no experience with SQLite, so here's hoping that you folks are a real friendly bunch and will help me get up to speed.