RE: [sqlite] Problems using SQLITE .Net Data Provider (Windows)

2005-08-15 Thread Robert Simpson
> -Original Message-
> From: Ken & Deb Allen [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 15, 2005 4:44 PM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] Problems using SQLITE .Net Data Provider (Windows)
> 
> I recently downloaded the (Finisar) .Net Data Provider for 
> SQLITE from SourceForge in order to use this in a C# 
> applications under Windoes XP. I had a few small problems 
> getting the database created at all via .Net, but that is 
> working, and I was able to also define the schema for my 
> database using CREATE TABLE, CREATE TRIGGER and CREATE INDEX 
> statements.

Hopefully you posted this on the Sourceforge forums for the Finisar SQLite
library ... I'm afraid the issues you describe are all beyond the scope of
this mailing list.

However, to answer your question (or at least attempt to) ... 

If I recall correctly, one of the things the Finisar library does is
pre-parse (as best it can) your SQL statements before passing them to the
underlying database engine.  It sounds like all your issues are related to
the parser.

If you (or anyone else for that matter) is planning on switching to .NET 2.0
and Visual Studio 2005, it might be worth your while to check out the .Net
2.0 provider currently complete and being beta-tested:

http://sourceforge.net/projects/sqlite-dotnet2

Robert




[sqlite] make test fails at tcl-10.5

2005-08-15 Thread Hari Kodungallur
Hi,

I am using the latest from the CVS. While doing "make test", it fails at
tcl-10.5 with a segmentation fault. 

myhost [/usr/home/sqlite] > make test
...
...
tcl-10.1... Ok
tcl-10.2... Ok
tcl-10.3... Ok
tcl-10.4... Ok
tcl-10.5...make: *** [test] Segmentation fault
myhost [/usr/home/sqlite] >

Can you please guide me on how I can debug the issue?
(If I comment out the tcl-10.5 in test/tclsqlite.test, all tests run
through without errors)

My System is SuSE 9.3

myhost:/usr/home # uname -a
Linux myhost 2.6.11.4-20a-smp #1 SMP Wed Mar 23 21:52:37 UTC 2005 i686
i686 i386 GNU/Linux



Thanks
-Hari

---
Hari Kodungallur
SpikeSource Inc.



Re: [sqlite] Linking libsqlite statically

2005-08-15 Thread D. Kettler

On Mon, 15 Aug 2005, Curtis King wrote:



On 15-Aug-05, at 7:12 PM, D. Kettler wrote:


g++ -o kumacgen kumacgen.cpp /usr/lib/libsqlite3.a


add -lpthread to your link line.

ck




Thank you!  I should have thought of that, d'oh.  Anyway, it works now.

--
David Kettler
[EMAIL PROTECTED]


Re: [sqlite] Linking libsqlite statically

2005-08-15 Thread Curtis King


On 15-Aug-05, at 7:12 PM, D. Kettler wrote:


g++ -o kumacgen kumacgen.cpp /usr/lib/libsqlite3.a


add -lpthread to your link line.

ck



RE: [sqlite] Linking libsqlite statically

2005-08-15 Thread D. Kettler

On Tue, 16 Aug 2005, Ulrik Petersen wrote:


Hi,


There are libsqlite3.a, libsqlite3.la, and libsqlite3.so files
in /usr/lib/


Could you show us the exact command line you are trying to use when
running g++ ?

I'm especially interested in the version where you give the
/usr/lib/libsqlite3.a fully qualified filename on the commandline.



Sure.  Linking dynamically with:

g++ -lsqlite3 -o kumacgen kumacgen.cpp

Works fine.  I tried:

g++ -static -lsqlite3 -o kumacgen kumacgen.cpp

and

g++ -o kumacgen kumacgen.cpp /usr/lib/libsqlite3.a

Neither of which works.  Though the error messages between the two are 
different.  The first complains about undefined references and the second 
seems to have a problem with libsqlite3.a itself, giving the error:


/usr/lib/libsqlite3.a(os_unix.o): In function `testThreadLockingBehavior':
: undefined reference to `pthread_create'

--
David Kettler
[EMAIL PROTECTED]


Re: [sqlite] Linking libsqlite statically

2005-08-15 Thread Curtis King


On 15-Aug-05, at 5:39 PM, D. Kettler wrote:


Project?  DLL?  Visual Studio?  I said I was using Linux and g++


just link with full path to libsqlite3.a

example: gcc -o foo foo.o /usr/local/lib/libsqlite3.a

man gcc

ck



RE: [sqlite] Linking libsqlite statically

2005-08-15 Thread Aaron Schneider
Sorry about that.  I'm using 2.8.16, and we just changed it to compile
into a lib that is statically linked into the executable (with no DLL) .
I encountered a very similar sounding problem, so I thought I would
offer our solution.  

I guess that sqlite3 is organized differently.  I just looked and
confirmed that sqlite3.h doesn't seem to have those values defined.

-Original Message-
From: D. Kettler [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 15, 2005 5:37 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] Linking libsqlite statically


On Mon, 15 Aug 2005, Aaron Schneider wrote:

>>> If you compile and use the header files from the projects, they will

>>> add a __declspec(dllimport) to the beginning of the files.  In 
>>> Visual
>
>>> Studio, this changes the symbol defs, so functions used in your
> linked
>>> code will not work.
>>>
>>> To fix it, just change the "#define SQLITE_EXPORT 
>>> __declspec(dllimport)" to "#define SQLITE_EXPORT" near the top of 
>>> sqlite.h.
>>>
>>
>> Project?  DLL?  Visual Studio?  I said I was using Linux and g++
>
> I know you're not using Visual Studio.  But I'm guessing that g++ does

> something similar.  Make sure that the macro SQLITE_EXPORT is not 
> equal to __declspec(dllimport), recompile all of the object files, and

> see if that works.
>

But I'm using the libraries that came with my distribution.  I didn't 
compile them myself in the first place, and I shouldn't have to go
editing 
system files just to statically link something.

In any event, I checked in sqlite3.h and it doesn't even contain a 
"#define SQLITE_EXPORT" line.

--
David Kettler
[EMAIL PROTECTED]


RE: [sqlite] Linking libsqlite statically

2005-08-15 Thread Ulrik Petersen
Hi,

> There are libsqlite3.a, libsqlite3.la, and libsqlite3.so files
> in /usr/lib/

Could you show us the exact command line you are trying to use when
running g++ ?

I'm especially interested in the version where you give the
/usr/lib/libsqlite3.a fully qualified filename on the commandline.

You might be interested in an introduction to doing static/dynamic
libraries on Unix, written by Dr. Kirk Lowery:

http://emdros.org/progref/page.php?pid=1080


Ulrik P.




RE: [sqlite] Linking libsqlite statically

2005-08-15 Thread D. Kettler

On Mon, 15 Aug 2005, Aaron Schneider wrote:


If you compile and use the header files from the projects, they will
add a __declspec(dllimport) to the beginning of the files.  In Visual



Studio, this changes the symbol defs, so functions used in your

linked

code will not work.

To fix it, just change the "#define SQLITE_EXPORT
__declspec(dllimport)" to "#define SQLITE_EXPORT" near the top of
sqlite.h.



Project?  DLL?  Visual Studio?  I said I was using Linux and g++


I know you're not using Visual Studio.  But I'm guessing that g++ does
something similar.  Make sure that the macro SQLITE_EXPORT is not equal
to __declspec(dllimport), recompile all of the object files, and see if
that works.



But I'm using the libraries that came with my distribution.  I didn't 
compile them myself in the first place, and I shouldn't have to go editing 
system files just to statically link something.


In any event, I checked in sqlite3.h and it doesn't even contain a 
"#define SQLITE_EXPORT" line.


--
David Kettler
[EMAIL PROTECTED]


RE: [sqlite] Linking libsqlite statically

2005-08-15 Thread Aaron Schneider
>> If you compile and use the header files from the projects, they will 
>> add a __declspec(dllimport) to the beginning of the files.  In Visual

>> Studio, this changes the symbol defs, so functions used in your
linked 
>> code will not work.
>>
>> To fix it, just change the "#define SQLITE_EXPORT 
>> __declspec(dllimport)" to "#define SQLITE_EXPORT" near the top of 
>> sqlite.h.
>>
>
>Project?  DLL?  Visual Studio?  I said I was using Linux and g++

I know you're not using Visual Studio.  But I'm guessing that g++ does
something similar.  Make sure that the macro SQLITE_EXPORT is not equal
to __declspec(dllimport), recompile all of the object files, and see if
that works.


[sqlite] Problems using SQLITE .Net Data Provider (Windows)

2005-08-15 Thread Ken & Deb Allen
I recently downloaded the (Finisar) .Net Data Provider for SQLITE  
from SourceForge in order to use this in a C# applications under  
Windoes XP. I had a few small problems getting the database created  
at all via .Net, but that is working, and I was able to also define  
the schema for my database using CREATE TABLE, CREATE TRIGGER and  
CREATE INDEX statements.


Issue #1: I had an original problem where defining a table with the  
first column as "Record ID INTGER PRIMARY KEY AUTOINCREMENT NOT NULL"  
works fine when I execute it from the command line, but it chokes on  
the "AUTOINCREMENT" word when executed via .Net. It was suggested  
that I simply remove the word, which I did, and which permitted the  
command to execute without error, but it is my understanding that the  
behaviour of the table is different with and without this keyword.


Issue #2: Another problem is attempting to use UNICODE in the  
database. If, from the command line, the first command after I open  
the database is [PRAGMA encoding="UTF-16"], and then I create the  
schema, when I open the database later from the command line and  
execute the command [PRAGMA encoding;], the result is reported as  
"UTF-16le", as expected. When I do the same thing from my C# code,  
the command line reports the encoding as "UTF-8".


Issue #3: If I define a table as [CREATE TABLE Events (EventID INT  
NOT NULL, EventName VARCHAR(32) NOT NULL, EventLongName VARCHAR(128)  
NOT NULL, CreationDate DATETIME NOT NULL] via the C# code, then when  
I attempt to add records to the table I get the following exception.  
This same command executed from the SQLITE command line executes  
without an error and adds the record to the table.


Anyone have any thoughts on why these errors may be reported by the  
SQLITE .Net Data Provider?


By the way, I am using the SQLITE 3.2.2 DLL file for Windows  
downloaded from the SQLITE web site and (I believe, since I am home  
now) version 1.7 of the .Net Data Provider.


-ken


Database creation results;

MSDE database successfully created! (765.6397 milliseconds)
SQLITE database successfully created! (93.7518 milliseconds)
VistaDB database successfully created! (62.5012 milliseconds)
Firebird database successfully created! (1109.3963 milliseconds)

—> System.ApplicationException; 5QLITE; error inserting [Event]; no  
such column; current_timestamp


INSERT INTO Events(EventID; EventName; EventLongName; CreationDate)  
VALUE5(1; 'Event #1', 'Long Event Name #1'; current.


Finisar.5QLite.5QLiteException; no such column; current_timestamp

al:Finisar.SQLite.sqlite3.Throw()

al:Finisar,SQLite,sqlite3,CheckOK()

al: Finisar.SQLite.sqlite3.compile(String zSql)

al:Finisar.5QLite.One5QL5tatement.Compile()

al:Finisar.5QLite.5QLiteCommand.E?;ecul:eNonQuery()

al: DatabaseE valuation. 5qliteDatabase.Populal:eEventInformation 
(Int32 MaxEventID) in
f;\testing\databaseevaluation 
\databaseevaluation^sqlitedatabase.cs;linell6


— End of inner exception stack trace —

at DatabaseE valuation. 5qliteDatabase.PopulateEventInformation(Int32  
MaxEventID) in
f;\testing\databaseevaluation\databaseevaluation\sqlitedatabase.cs;  
line 130


at DatabaseE valuation.  
DatabaseEvaluationForm,buttonPrepareDatabases_Clicb(Object sender;  
EventArgs e) in
f;\testing\databaseevaluation\databaseevaluation 
\databaseevaluationform,cs; line 171


i ^...^.^ i




RE: [sqlite] Linking libsqlite statically

2005-08-15 Thread D. Kettler

On Mon, 15 Aug 2005, Aaron Schneider wrote:


If you compile and use the header files from the projects, they will add
a __declspec(dllimport) to the beginning of the files.  In Visual
Studio, this changes the symbol defs, so functions used in your linked
code will not work.

To fix it, just change the "#define SQLITE_EXPORT __declspec(dllimport)"
to "#define SQLITE_EXPORT" near the top of sqlite.h.



Project?  DLL?  Visual Studio?  I said I was using Linux and g++

--
David Kettler
[EMAIL PROTECTED]


RE: [sqlite] Linking libsqlite statically

2005-08-15 Thread Aaron Schneider
>When I add the -static flag to my g++ command it gives me 'undefined 
>reference to' errors for every instance where I attempt to use a sqlite

>function.

If you compile and use the header files from the projects, they will add
a __declspec(dllimport) to the beginning of the files.  In Visual
Studio, this changes the symbol defs, so functions used in your linked
code will not work.

To fix it, just change the "#define SQLITE_EXPORT __declspec(dllimport)"
to "#define SQLITE_EXPORT" near the top of sqlite.h.

HTH,
Aaron


[sqlite] Linking libsqlite statically

2005-08-15 Thread D. Kettler

Hello,

I've written a simple C++ app which uses sqlite and thus far it works 
perfectly fine as long as I compile it linking to the library dynamically 
(standard g++ behavior).  However, I would like to be able to distribute 
this app to people who do not necessarily have the sqlite libraries 
installed, and so I want to link the sqlite libraries statically.


When I add the -static flag to my g++ command it gives me 'undefined 
reference to' errors for every instance where I attempt to use a sqlite 
function.


This is on a Debian (testing) system and yes I have both libsqlite3 and 
libsqlite3-dev installed.  There are libsqlite3.a, libsqlite3.la, and 
libsqlite3.so files in /usr/lib/


I also tried giving the path to the libsqlite3.a file explicitly, but it 
works no better.


Any thoughts?  Thanks.

--
David Kettler
[EMAIL PROTECTED]


Re: [sqlite] Strange performance problem

2005-08-15 Thread Khamis Abuelkomboz

Hi Michael

I tried your example and have experienced the same results. Then I 
created the following two indices, now the two queries are same fast:


CN_execute "CREATE INDEX idx_t1_id ON t1 (id)"
CN_execute "CREATE INDEX idx_t2_id ON t2 (id)"

It seems that sqlite doesn't create an index for primary keys that are 
not "INTEGER" :-) But haven't verified it yet.


khamis

Michael Gross wrote:


Khamis Abuelkomboz wrote:


CREATE INDEX idx_t2_t1id ON t2 (t1id, deleted);


Doent not help.


whereas the following quere takes "no" time:
  SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE 
t1.deleted<>1



This is fast, because no entries has been found to be joined.


This is not true - "deleted" hast the value 0 in all rows - so
"t1.deleted=0" and "t1.deleted<>1" brings the same result.


And now - check this out - the following query ist fast too:

SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE NOT NOT
(t1.deleted=0)

Whereas

SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE (t1.deleted=0)

is slow. And as far as I undestand this should be the same, or do I miss
sth?

thx
  Michael





--
Try Code-Navigator on http://www.codenav.com
a source code navigating, analysis and developing tool.
It supports following languages:
   * C/C++
   * Java
   * .NET (including CSharp, VB.Net and other .NET components)
   * Classic Visual Basic
   * PHP, HTML, XML, ASP, CSS
   * Tcl/Tk,
   * Perl
   * Python
   * SQL,
   * m4 Preprocessor
   * Cobol



Re: [sqlite] Strange performance problem

2005-08-15 Thread Michael Gross

Khamis Abuelkomboz wrote:

CREATE INDEX idx_t2_t1id ON t2 (t1id, deleted);

Doent not help.


whereas the following quere takes "no" time:
  SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE t1.deleted<>1


This is fast, because no entries has been found to be joined.

This is not true - "deleted" hast the value 0 in all rows - so
"t1.deleted=0" and "t1.deleted<>1" brings the same result.


And now - check this out - the following query ist fast too:

SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE NOT NOT
(t1.deleted=0)

Whereas

SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE (t1.deleted=0)

is slow. And as far as I undestand this should be the same, or do I miss
sth?

thx
  Michael



Re: [sqlite] Strange performance problem

2005-08-15 Thread Khamis Abuelkomboz

Michael Gross wrote:


Hello
I use sqlite 3.2.2. I have a strange performance problem. I am able to 
solve the problem by a slight change in the query but I want to ask if 
somebody can explain this behavior to me:


I have two tables:
  CREATE TABLE t1 (id VARCHAR(40) NOT NULL PRIMARY KEY, deleted BIT);
  CREATE TABLE t2 (id VARCHAR(40) NOT NULL PRIMARY KEY, t1id 
VARCHAR(40), deleted BIT);

  CREATE INDEX idx_t1_deleted ON t1 (deleted);
  CREATE INDEX idx_t2_deleted ON t2 (deleted);
  CREATE INDEX idx_t2_t1id ON t2 (t1id);


try the following index

CREATE INDEX idx_t2_t1id ON t2 (t1id, deleted);


When I now insert 2500 times (%d is the incrementing variable):
  INSERT INTO t1 (id, deleted) VALUES ('%d', 0);
  INSERT INTO t2 (id, t1id, deleted) VALUES ('%d', '%d', 0);
  INSERT INTO t2 (id, t1id, deleted) VALUES ('xxx%d', '%d', 0);

The the following query takes about 1 minute:
  SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE t1.deleted=0


This is slow, because the join is not indexed


whereas the following quere takes "no" time:
  SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE t1.deleted<>1


This is fast, because no entries has been found to be joined.

Keep in mind, that only one index can be used for a query or subquery.



thx
  Michael





--
Try Code-Navigator on http://www.codenav.com
a source code navigating, analysis and developing tool.
It supports following languages:
   * C/C++
   * Java
   * .NET (including CSharp, VB.Net and other .NET components)
   * Classic Visual Basic
   * PHP, HTML, XML, ASP, CSS
   * Tcl/Tk,
   * Perl
   * Python
   * SQL,
   * m4 Preprocessor
   * Cobol



RE: [sqlite] RFC Beginning digit in column name

2005-08-15 Thread Ned Batchelder
Dr. Hipp isn't showing his hand here, but the timeline indicates that he
added support for MySQL-style backquote quoting on Saturday:
http://www.sqlite.org/cvstrac/chngview?cn=2591

--Ned.
http://nedbatchelder.com
 

-Original Message-
From: Marcus Welz [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 10 August, 2005 4:23 PM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] RFC Beginning digit in column name

Hello there,

I think that adhering to standards is a Very Good Thing(tm). They are
standards for a reason. Deviations can introduce ambiguity, confusion,
complexity, vendor lock-ins and all sorts of other headaches.

That said, however, I believe that "no, because it's not the standard" isn't
exactly what a customer wants to hear. Then again "no" isn't what a customer
wants to ever hear in almost any context, but I digress..

Customers / users may wonder "Well, they (e.g. MySQL) can do it, why can't
you?" And I think in a fair number of situations, if possible to implement
at a reasonable amount of cost the answer should be "We can, but be warned,
it is NOT the standard."

Some proprietary extensions are rather handy, too, and may want be be
considered. I don't really think "`" and "[]" are useful nor pretty, but I
also don't think that it would be unethical to support it. On the other
hand, MySQL's "SQL_CALC_FOUND_ROWS" keyword and the "FOUND_ROWS()" function
for instance have made my life easy in the past. (SQL_CALC_FOUND_ROWS in a
query counts how many rows there would have been returned with the LIMIT
clause omitted, great for pagination if you want to display something like
"Rows 1 - 15, 400 total" all while running a complex query (with a whole
slew of JOINS and WHERE conditions) only once.

The short of it all: I don't know much about SQLite's internal architecture,
besides glossing over the web site documentation, but my suggestion is to
add a new PRAGMA statement ("PRAGMA tolerate_broken_sql = 1" :-), which
should be _disabled_ by default, but when enabled would honor proprietary
extensions such as "[]" and "`" for quotation, digits in column names, and
who knows, maybe even some of the other extensions and vendor specific
functions, etc.

It would allow numerous projects to more easily migrate away from MySQL to
SQLite without needing to clean up all their broken SQL instantly, and it
would allow projects that want to stick with MySQL to also offer a SQLite
version with little effort.

How off the wall am I with this?

-m

-Original Message-
From: Austin Ziegler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 10, 2005 2:44 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] RFC Beginning digit in column name

On 8/10/05, ender <[EMAIL PROTECTED]> wrote:
> Austin Ziegler wrote:
>>On 8/9/05, ender <[EMAIL PROTECTED]> wrote:
>>> So my simple feature request would be: allow '`' as a quoting symbol -
>>> as mySQL does. Or - what would be as helpful as the other idea - allow
>>> unquoted column names with leading digits - as mySQL does.
>>> Also see ticket # 1337  http://www.sqlite.org/cvstrac/tktview?tn=1337
>> I think that supporting '`' (backquote) would be a bad idea. Then
>> again, MySQL ignores so much of the SQL standard that I think that
>> importing any idea from MySQL is a bad idea.
> What are your reasons for thinking supporting '`' is a bad idea?

1. It's not part of the standard.
2. It's not part of the standard.
3. MySQL does it. Therefore, no one else should do it, because:
4. It's not part of the standard (and most of what MySQL does is not
part of the standard).

If you've learned "SQL" on MySQL, you haven't learned SQL. You've
learned MySQL. The same applies to people who want to do [tablename]
-- it's a Microsoftism that (IMO) should be *de-supported* in SQLite
because it's ugly and wrong.

The only quotes that SQL92 supports are ' and "; ' indicates data, "
indicates literal interpretation of table and column names. Not `, not
[].

If MySQL does it and it's not part of the standard, I'm opposed to it.

-austin
-- 
Austin Ziegler * [EMAIL PROTECTED]
   * Alternate: [EMAIL PROTECTED]




[sqlite] ANN: DragonDB - MVB Edition 1.0 for AppForge MobileVB

2005-08-15 Thread John Oliva
Danic Systems Releases DragonDB - MVB Edition 1.0 for AppForge MobileVB.
 
East Brunswick, NJ, USA (August 12, 2005) -- Danic Systems, LLC
announced today that it is shipping DragonDB - MVB Edition 1.0 for
AppForge MobileVB.  DragonDB - MVB Edition is an SQL database engine and
software development toolkit for creating Microsoft Pocket PC and
Smartphone database applications using AppForge MobileVB.
 
DragonDB - MVB Edition works with AppForge MobileVB (version 3.2 or
later) for producing database applications which run on Microsoft Pocket
PC and Smartphone devices running Windows Mobile 2003 (or later
version).
 

Major Benefits
 
* Affordable - No royalty fees when deploying your applications.
* Rapid Development - Easy to use API with a full featured SQL
relational database engine. 
* Trivial deployment - Simply include a couple of shared libraries with
your application.
* Trivial management - Zero-configuration. No setup or administration
needed.
* Small footprint - Approximately 300KB for either Pocket PC or
Smartphone platforms.
* High performance - Efficient/optimized design yields extremely fast
queries and other database operations.
* Portable - A database may simply be copied from one platform to
another (binary compatibility). 
* Lifetime updates - Updates are free for your licensed major version
number.
 
Major Features
 
* Powerful SQL relational database management engine embedded in
AppForge MobileVB compliant fuser.
* Complete and well documented API.
* VB6 project template for creating DragonDB powered AppForge MobileVB
applications.
* Royalty-free MobileVB compliant fusers for MS Pocket PC and Smartphone
target devices.
* Design time Win32 fuser for developing your DragonDB applications.
* Example programs
* Bundled with useful third-party tools to accelerate your development.
 
 
About DragonDB - MVB Edition
 
DragonDB - MVB Edition provides an SQL database engine for AppForge
MobileVB which is affordable, powerful and portable.  DragonDB is built
upon SQLite3 which is a popular database engine included as a core
component in Apple's Mac OS X and as the native DB for the PHP scripting
language. 
 

Availability
 
DragonDB - MVB Edition 1.0 is available now from the Danic Systems
website at http://www.danicsystems.com.
 
The full version is available at an introductory price of $299 per
development license without any royalties for your deployed
applications. Volume discounts are available. A 30 day free trial
version is also available.
 

About Danic Systems, LLC
 
Danic Systems, LLC is a privately held software company providing
applications and tools for the Microsoft Windows desktop and mobile
operating systems.  Our specialty is in providing applications and tools
which bridge the power of the desktop computer with the flexibility
offered by mobile devices.
 
Contact Information
 
Company Name: Danic Systems, LLC
E-mail: [EMAIL PROTECTED]
Website: http://www.danicsystems.com
 
 


[sqlite] Strange performance problem

2005-08-15 Thread Michael Gross

Hello
I use sqlite 3.2.2. I have a strange performance problem. I am able to 
solve the problem by a slight change in the query but I want to ask if 
somebody can explain this behavior to me:


I have two tables:
  CREATE TABLE t1 (id VARCHAR(40) NOT NULL PRIMARY KEY, deleted BIT);
  CREATE TABLE t2 (id VARCHAR(40) NOT NULL PRIMARY KEY, t1id 
VARCHAR(40), deleted BIT);

  CREATE INDEX idx_t1_deleted ON t1 (deleted);
  CREATE INDEX idx_t2_deleted ON t2 (deleted);
  CREATE INDEX idx_t2_t1id ON t2 (t1id);

When I now insert 2500 times (%d is the incrementing variable):
  INSERT INTO t1 (id, deleted) VALUES ('%d', 0);
  INSERT INTO t2 (id, t1id, deleted) VALUES ('%d', '%d', 0);
  INSERT INTO t2 (id, t1id, deleted) VALUES ('xxx%d', '%d', 0);

The the following query takes about 1 minute:
  SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE t1.deleted=0

whereas the following quere takes "no" time:
  SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t1.id=t2.id WHERE t1.deleted<>1


thx
  Michael



[sqlite] SQLite from Excel VBA

2005-08-15 Thread Giorgio Bocchi

I'm try to replace MSAccess and to use SQLite instead as proved to be more fast 
and reliable

Is there an efficient way of interacting with SQLite from VBA in Excel. What 
I'm trying to do is
1. open the database
2. insert values from my s/sheet
3. run some sql script and queries
4. create a csv output

your help will be much appreciated

thanks

Giorgio



--

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorized 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.