Anton Kuznetsov wrote:
Hello, Gerry.

----- Original Message ----- From: "Gerry Snyder" <[EMAIL PROTECTED]>
To: <sqlite-users@sqlite.org>
Sent: Tuesday, November 08, 2005 9:44 PM
Subject: [sqlite] Running Versions 2 and 3 simultaneously -- was: Re: [sqlite] sqlite 2.0 database

1) First of all, according to Dr. Hipp, "You have to load version 3 of the TCL bindings first, then version 2."

Your script does it in the other order.


It doesn't matter.

Dr. Hipp said it did. I thought he should know. You seem to think you know better.

See test script below. Try to run it.

The test script below does it in the correct order.

BTW, do you get an error message:

conflicting versions provided for package "sqlite": 3.0, then 2.0  ?

If not, you are not really loading both versions when you think you are.


2) Second, your [pcdb] command generated by version 2 seems to need either one argument (the SQL) or three (SQL, ARRAY-NAME, and CODE).

In the above I meant to say that [pcdb eval] needs 1 argument or 3, and you use 2.


Your script has two arguments in the "creating tables" section (I got it to work by adding a blank array name).


1) pcdb command in my script has three arguments:
   a) method ("eval");
   b) SQL statement;
   c) script;

2) According to Dr. Hipp: "If you supply the name of an array variable in between the SQL statement and the script, column values are put into elements of the array instead of into local variables."
This means that the name of an array variable is optional.

Dr. Hipp was writing about version 3. When I ran (part of) your test script I got the error message:

wrong # args: should be "pcdb eval SQL ?ARRAY-NAME CODE?"


Read this article more carefully:
http://www.tcl.tk/community/tcl2004/Papers/D.RichardHipp/drh.html

I have read it multiple times. I have learned a lot from it. Including the fact that it does not apply to version 2 of sqlite.


3) But still, after getting past these trivialities, your script has one command simultaneously working with both version 2 and version 3 files. The file formats are incompatible.


Yes. It's working. It's a fact. All questions to Dr.Hipp.

You think it is working. Can you read the first file with version 2 of the command line program, and the final file with version 3 of the command line program?

And please, answer how it can be possible, if what you think is happening really is happening, version 2 of the TCL binding can be populating a version 3 database file?

Gerry

Reply via email to