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 I

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

[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] 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 wrong,

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

[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

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

Re: [sqlite] Opening a database on a Mac

2011-06-17 Thread john darnell
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. Pavel On Fri, Jun 17, 2011 at 3:08 PM, john darnell john.darn...@walsworth.com

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
-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 SQLite database on the Mac (OSX Snow Leopard) and am

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
: [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. The use of colons for file paths is purely an old-fashioned Mac thing

Re: [sqlite] OSX path

2011-06-17 Thread john darnell
...@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 Is that also your excuse for top-posting? :) I will have

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 least

[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] Unlocking the database

2011-05-28 Thread john darnell
- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Roger Binns Sent: Saturday, May 28, 2011 11:21 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Unlocking the database -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/28/2011 09:02 AM, john

Re: [sqlite] Unlocking the database

2011-05-28 Thread john darnell
Discussion of SQLite Database Subject: Re: [sqlite] Unlocking the database On Sat, May 28, 2011 at 12:25 PM, john darnell john.darn...@walsworth.comwrote: I tried rebooting the machine and it did not unlock the table. That sounds unlikely. What OS are you using? Are you using a non

Re: [sqlite] Unlocking the database

2011-05-28 Thread john darnell
: 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, 2011, 1:02 PM On 28 May 2011, at 5:39pm, john darnell wrote: After the reboot, I tried opening the database in my

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

[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] 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 Jean-Denis Muys Sent: Thursday, May 26, 2011 10:08 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] SQLite in Xcode On 26 mai 2011, at 16:49, john

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

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. Wherever you got

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
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 at 12:35 PM, john darnell john.darn...@walsworth.com wrote: Mr. Slavin, here's the information you requested: Please note that I am

Re: [sqlite] SQLite in Xcode

2011-05-26 Thread john darnell
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] SQLite in Xcode On 26 May 2011, at 8:12pm, john darnell wrote: Thank

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

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

Re: [sqlite] Compiling in Xcode 3.1.3

2011-05-16 Thread john darnell
Database Subject: Re: [sqlite] Compiling in Xcode 3.1.3 On Mon, May 16, 2011 at 4:01 PM, john darnell john.darn...@walsworth.comwrote: 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

Re: [sqlite] Compiling in Xcode 3.1.3

2011-05-16 Thread john darnell
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.comwrote: Thanks for responding, Mr HIpp. There are 1265 errors in all, but most of them look very close to something like this: Invalid

Re: [sqlite] Compiling in Xcode 3.1.3

2011-05-16 Thread john darnell
: 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 highlighted the file, clicked the information icon

Re: [sqlite] Compiling in Xcode 3.1.3

2011-05-16 Thread john darnell
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. When pressing Command-K I get no errors but one warning: Warning, no rule to process sqlite3.c

[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, db_ptr,

[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

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
of c_str() and let it determine length of the string. So this definitely can't fix any problem. I guess you somehow changed result of GetSurName() on the way here. Pavel On Fri, Dec 17, 2010 at 6:18 PM, john darnell john.darn...@walsworth.com wrote: Okay.  I worked out a solution, but I am

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

[sqlite] FW: Troubleshooting...

2010-12-20 Thread john darnell
; ( 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, William||0|1|0 6||µ╜Ƶòóτæ▓|Patricia

Re: [sqlite] Troubleshooting...

2010-12-20 Thread john darnell
-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]; memset(surbuf, 0, 100); strcpy(surbuf, CurrentName

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

2010-12-17 Thread john darnell
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 USING SQLITE, which came out in August of this year, so it's

Re: [sqlite] Troubleshooting...

2010-12-17 Thread john darnell
, Dec 16, 2010 at 4:47 PM, john darnell john.darn...@walsworth.com wrote: -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Thursday, December 16, 2010 2:53 PM To: General Discussion of SQLite

Re: [sqlite] Troubleshooting...

2010-12-17 Thread john darnell
terminal encoding. Meanwhile to check that your database contains what you want try to redirect all output from sqlite3.exe to some text file and then view it in notepad or browser. They can understand UTF-8 encoding pretty well. Pavel On Thu, Dec 16, 2010 at 4:47 PM, john darnell john.darn

Re: [sqlite] Troubleshooting...

2010-12-17 Thread john darnell
mytable output.txt Pavel On Fri, Dec 17, 2010 at 5:23 PM, john darnell john.darn...@walsworth.com wrote: I could not figure out how to pipe my info to a file (I guess I am still a very young (at 57 years) newbie when it comes to SQLite) so I tried something else.  In my code, I

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

[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] Troubleshooting...

2010-12-16 Thread john darnell
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 most important statements are working…or rather, the first adds a record to the table, but it is mostly junk, looking

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

[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

Re: [sqlite] enums

2010-12-07 Thread john darnell
, 2010 at 8:38 PM, john darnell john.darn...@walsworth.comwrote: 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 table and lookup join. Can you name a reason to do this internally by sqlite? Max

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 john darnell john.darn...@walsworth.com писал(а

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

[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

[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] 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.

Re: [sqlite] Just compiled SQLite in Visual Studio

2010-11-29 Thread john darnell
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-sounding question. I got my boss to purchase an O'Reilly book called