Re: [sqlite] "extension-functions.c" in windows mobile

2009-04-09 Thread Thibaut Gheysen
Hi,

Yes, it's a solution but I want to test the two approachs (in VB and in
SQLite with an extension) to choice the faster. Before, I worked with VB6
and Access and the faster way is to use the calculation possibilities of
Access. I want just try it with VB .Net and SQLite. But I'm not able to
build the extension and thus test the 2 approachs.

Best regards,
Thibaut.

2009/4/9 John Machin 

> On 10/04/2009 12:34 AM, Thibaut Gheysen wrote:
> > Hi,
> >
> > I develop a windows mobile application in VB .Net (compact framework 2.0)
> > with SQLite and the ADO.net provider. In this application, I must
> calculate
> > the distance between 2 points for all items of a table. For this I need
> > "power" and "sqrt" function but these functions doesn't seem to be
> include
> > in SQLite core functions.
>
> That's why it has "Lite" in the name.
>
> > I have found the "extension-functions.c" in the
> > contrib page of the SQLite website but I'm not able to build it for
> windows
> > ce. Anybody can help me ?
> >
>
> DBMSs are for storing data and doing *elementary* calculations on the data.
>
> Why don't you do the calculation in VB?
>
> Cheers,
>
> John
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Open Source .Net CRM system using SQLite

2009-04-09 Thread Mike Funduc

Hello,

We released a Database Manager we developed for managing customer info and 
purchases, creating invoices, searching and reporting.

It's all posted on: http://www.funduc.com/fsdbmgr.htm

Thank you SQLite community!

Mike Funduc
Funduc Software Inc.

supp...@funduc.com
http://www.funduc.com



_
Rediscover Hotmail®: Get quick friend updates right in your inbox. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Existing dbs available by FTP/Torrent/etc?

2009-04-09 Thread P Kishor
On Thu, Apr 9, 2009 at 6:42 PM, Kelly Jones  wrote:
> On 4/9/09, P Kishor  wrote:
>> On Thu, Apr 9, 2009 at 6:23 PM, Kelly Jones 
>> wrote:
>>> Given how cool SQLite is, has anyone created SQLite dbs of geonames,
>>> tycho2, or other large data sets that are available for download via
>>> FTP, HTTP, Torrent or similar mechanism?
>>>
>>> I realize I could dl the raw data, create tables, import the data,
>>> create indexes, etc, but it's much faster just to download a single
>>> platform-independant file that does all that for me already!
>>
>> http://www.geonames.org/export/
>>
>> a simple text file. .import it into your sqlite3 db as you wish
>
> I tried that, and wish it were that simple. Problems:
>
>  % No indexes + indexes take a LONG time to create (it's a lot of data)
>
>  % I know http://download.geonames.org/export/dump/allCountries.zip
>  has data for all countries, but it doesn't have counties, states,
>  alternate names, and other info.
>
>  % I downloaded the other text files and created tables from them too,
>  but that's more tables and more indexes I have to create.
>
>  % I created a view that joins placename to its admin2code to its
>  admin1code, etc, and indexes to do the joins efficiently, but, again
>  more work.
>
> I was going to do even more w/ this:
>
> http://groups.google.com/group/geonames/browse_thread/thread/417555edd150f839/4\
> 4ef4238d41b2cb1
>
> but why re-invent the wheel. SQLite is the perfect tool to allow
> people to share true databases (indexes, view, etc), not just data.
>


I did make the db once but then blew it away. The problem is, if one
were to make an all encompassing database with all the indexes and
all, then, as you said, it would become way too big to offer it as a
download. Besides, the geonames dump keeps on refreshing every day.
Isn't it better to use the freshest copy possible via a web service?
Well, you can

http://www.geonames.org/export/ws-overview.html

I would probably use something like Geo::GeoNames from CPAN in my code
http://search.cpan.org/~perhenrik/Geo-GeoNames/lib/Geo/GeoNames.pm



-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Carbon Model http://carbonmodel.org/
Open Source Geospatial Foundation http://www.osgeo.org/
Sent from Madison, WI, United States
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Existing dbs available by FTP/Torrent/etc?

2009-04-09 Thread Kelly Jones
On 4/9/09, P Kishor  wrote:
> On Thu, Apr 9, 2009 at 6:23 PM, Kelly Jones 
> wrote:
>> Given how cool SQLite is, has anyone created SQLite dbs of geonames,
>> tycho2, or other large data sets that are available for download via
>> FTP, HTTP, Torrent or similar mechanism?
>>
>> I realize I could dl the raw data, create tables, import the data,
>> create indexes, etc, but it's much faster just to download a single
>> platform-independant file that does all that for me already!
>
> http://www.geonames.org/export/
>
> a simple text file. .import it into your sqlite3 db as you wish

I tried that, and wish it were that simple. Problems:

 % No indexes + indexes take a LONG time to create (it's a lot of data)

 % I know http://download.geonames.org/export/dump/allCountries.zip
 has data for all countries, but it doesn't have counties, states,
 alternate names, and other info.

 % I downloaded the other text files and created tables from them too,
 but that's more tables and more indexes I have to create.

 % I created a view that joins placename to its admin2code to its
 admin1code, etc, and indexes to do the joins efficiently, but, again
 more work.

I was going to do even more w/ this:

http://groups.google.com/group/geonames/browse_thread/thread/417555edd150f839/4\
4ef4238d41b2cb1

but why re-invent the wheel. SQLite is the perfect tool to allow
people to share true databases (indexes, view, etc), not just data.

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Existing dbs available by FTP/Torrent/etc?

2009-04-09 Thread P Kishor
On Thu, Apr 9, 2009 at 6:23 PM, Kelly Jones  wrote:
> Given how cool SQLite is, has anyone created SQLite dbs of geonames,
> tycho2, or other large data sets that are available for download via
> FTP, HTTP, Torrent or similar mechanism?
>
> I realize I could dl the raw data, create tables, import the data,
> create indexes, etc, but it's much faster just to download a single
> platform-independant file that does all that for me already!
>


http://www.geonames.org/export/

a simple text file. .import it into your sqlite3 db as you wish


-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Carbon Model http://carbonmodel.org/
Open Source Geospatial Foundation http://www.osgeo.org/
Sent from Madison, WI, United States
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Existing dbs available by FTP/Torrent/etc?

2009-04-09 Thread Kelly Jones
Given how cool SQLite is, has anyone created SQLite dbs of geonames,
tycho2, or other large data sets that are available for download via
FTP, HTTP, Torrent or similar mechanism?

I realize I could dl the raw data, create tables, import the data,
create indexes, etc, but it's much faster just to download a single
platform-independant file that does all that for me already!

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] delete with an "exists" clause

2009-04-09 Thread Dave Dyer

>I realize your example may not reflect the specific needs of your 
>application, ...

Yea, my actual application required a query too complex to be
put in an ordinary "where" clause.   I think I've figured it
out - think of the "exists" clause as sort of an implied
join with the table to be partially deleted.

if the selection query is similar to:

  select * from image left join attribute on image.uid=attribute.value

I suppose if SQL had anything like a consistent syntax, I would
expect to write this as something like:

  delete from image left join attribute on image.uid=attribute.value

SQL doesn't allow this, but this "exists" clause is what you can use instead.

  delete from image where exists 
(select * from attribute on attribute.value = image.uid)

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] delete with an "exists" clause

2009-04-09 Thread cmartin
On Thu, 9 Apr 2009, Dave Dyer wrote:

> This little program deletes all rows.  Is this a bug, or
> perhaps I misunderstand how delete with an exists clause
> is supposed to work.
>
> drop table if exists dummy;
> create table dummy ( var int);
> insert into dummy (var) values (1);
> insert into dummy (var) values (2);
> insert into dummy (var) values (3);
> delete from dummy where exists (select * from dummy where var='2');

First, you don't need/want the quotes around the 2 since you defined it 
as an integer. But that is unrelated to your question.

'exists' returns true if the subquery returns any data at all. Since there 
is at least one row where var=2, exists is true, which means it is true 
for every row in your main clause ('delete from dummy'), so all rows get 
deleted. Your delete query is the functional eqivalent of this:

delete from dummy where 1=1;

Since 1=1 is always true, all rows get deleted.

Note that this qry will not delete any rows:

   delete from dummy where exists (select * from dummy where var='999');

because there is no row where var=999. Exists = false for all rows, 
nothing is deleted.

I realize your example may not reflect the specific needs of your 
application, but in the context of your example, this will achieve what 
you want:

   delete from dummy where var=2;

Chris

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] delete with an "exists" clause

2009-04-09 Thread Jim Wilcoxson
You want:

delete from dummy where var=2;

In years of DB work, I've never used exists.  If you're mentioning
this as a bug, I guess it could be: I'd have to lookup exists to see
exactly how it's supposed to work.

Jim

On 4/9/09, Dave Dyer  wrote:
>
> This little program deletes all rows.  Is this a bug, or
> perhaps I misunderstand how delete with an exists clause
> is supposed to work.
>
> drop table if exists dummy;
> create table dummy
> ( var int
> );
> insert into dummy (var) values (1);
> insert into dummy (var) values (2);
> insert into dummy (var) values (3);
>
> delete from dummy where exists (select * from dummy where var='2');
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
Software first.  Software lasts!
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] delete with an "exists" clause

2009-04-09 Thread Dave Dyer

This little program deletes all rows.  Is this a bug, or
perhaps I misunderstand how delete with an exists clause
is supposed to work.

drop table if exists dummy;
create table dummy 
( var int 
);
insert into dummy (var) values (1);
insert into dummy (var) values (2);
insert into dummy (var) values (3);

delete from dummy where exists (select * from dummy where var='2');

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite performance on select/update with 11GB database file

2009-04-09 Thread Kees Nuyt
On Wed, 08 Apr 2009 23:17:02 +0200, Florian Nigsch
 wrote:

>Hi all,
>
>I have been trying to implement a couple of things in SQLite because I  
>only need it for myself (so no concurrency issues here).
>
>I am working on Arch Linux (uname: 2.6.28-ARCH #1 SMP PREEMPT Sun Mar  
>8 10:18:28 UTC 2009 i686 Intel(R) Xeon(TM) CPU 3.40GHz). I have a flat  
>text file that I want to put into SQLite to be able to query it and  
>also update fields it required. This raw text file has 7.2GB, roughly  
>11 million entries and 60 fields. (Perhaps not the best design, but  
>that shall not be the issue here)

We can't ignore that. If you have 11 million entries and 60
fields, I bet there is a lot of redundant data in the
database, which makes it big.
Normalization can make a lot of difference here.

>Getting it into SQLite was not as easy as I anticipated. At first, I  
>used the execute() method for every insert, and committed every 1  
>rows. This run didn't finish overnight.
>
>The a commit every 100,000 rows: at around 2.5 million entries it  
>slowed down so much that it was unacceptable. I used PRAGMA  
>journal_mode = OFF which improved a bit, but not enough.
>
>The final rescue was to use executemany() for every 100,000 records  
>combined with a commit(). That put the whole file in the DB in approx  
>17 min. Creation of indices where required took another 40 minutes.  
>The final database file has roughly 11GB.
>
>Now, I have 3 spare fields in the table that I want to populate with  
>data from another file. I loop over the file in question, from there I  
>get the ID of the record to update in the table and the info to  
>populate the empty field with. Again, I used executemany() every  
>100,000 records, assuming that it would work. But no.
>
>Even when I use executemany() every 10,000 rows, these 10,000 updates  
>take around 5 minutes or so (I haven't properly timed it). That is  
>also with PRAGMA journal_mode = OFF.

I don't recognize executemany() or commit(). They are not
part of the sqlite3_* API. Can I assume they are your own
wrapper functions? 

You did tell you commit() your transactions, but do you also
BEGIN them? (I apologize for asking the obvious, but someone
has to ask it anyway).

>When I just get the IDs of the entries that I need to update, look  
>them up in the table (select a,b,c from table where id in (...)), and  
>retrieve them with fetchall() and do nothing with them (no printing,  
>etc.) then this works fine for the first 10,000 records. After that,  
>again, it get's so slow that it's basically unusable. The ID field  
>that I use for the lookups has an index on it. The fields that I am  
>updating do not have indices on them. It's just text fields that are  
>being populated with strings up to approx 150 characters.
>
>Why are the retrievals that slow, and why are they getting slower the  
>further I go? And why are the updates so slow?
>
>Is it because the database file is too big?
> 
>Any help or suggestions would be highly appreciated!
>
>Regards,
>
>Flo

-- 
  (  Kees Nuyt
  )
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Strange sqlite_busy deadlock behavior

2009-04-09 Thread Griggs, Donald


Dave, 

Regarding: "I understand what a deadlock is, and I know it's not
technically a deadlock. This is why I stated the title as deadlock
behavior."

My apologies, Dave. I thought there might actually have been a
difference in definition that was adding to your problem.   After your
reply, though, I see that I had *not* actually seen your original post
as I thought I had.

Worse, I don't have the knowledge to help you much with your actual
problem (interpret stack trace, etc.) other than to say that others have
had success with multi-threaded apps though I understand they can be
vexing.

Am I right that you've determined for certain that you finalized and
committed on one thread yet still receive the BUSY for some time when
polling from the other thread?   

Hoping you and those more knowledgeable on this list than I  will work
out a fix shortly,
   Donald
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] when A table in the database is locked

2009-04-09 Thread Arthur Skowronek
Joanne Pham wrote:
> Hi All,
Hi Joanne Pham,

> I have seen the define for SQLITE_LOCKED as below
> #define SQLITE_LOCKED   6   /* A table in the database is locked */
> I thought the SQLITE is database locking so I was wondering when the table in 
> the database is locked?
> Thanks,
you're right. But there are diffrent forms of locking. You can read
more about it on the SQLite website

http://www.sqlite.org/lang_transaction.html

Kind regards,
 Arthur S.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] when A table in the database is locked

2009-04-09 Thread Igor Tandetnik
Joanne Pham  wrote:
> I have seen the define for SQLITE_LOCKED as below
> #define SQLITE_LOCKED 6 /* A table in the database is locked */
> I thought the SQLITE is database locking so I was wondering when the
> table in the database is locked?

http://sqlite.org/sharedcache.html

Igor Tandetnik 



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] when A table in the database is locked

2009-04-09 Thread Joanne Pham
Hi All,
I have seen the define for SQLITE_LOCKED as below
    #define SQLITE_LOCKED   6   /* A table in the database is locked */
I thought the SQLITE is database locking so I was wondering when the table in 
the database is locked?
Thanks,
JP



  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] "extension-functions.c" in windows mobile

2009-04-09 Thread John Machin
On 10/04/2009 12:34 AM, Thibaut Gheysen wrote:
> Hi,
> 
> I develop a windows mobile application in VB .Net (compact framework 2.0)
> with SQLite and the ADO.net provider. In this application, I must calculate
> the distance between 2 points for all items of a table. For this I need
> "power" and "sqrt" function but these functions doesn't seem to be include
> in SQLite core functions.

That's why it has "Lite" in the name.

> I have found the "extension-functions.c" in the
> contrib page of the SQLite website but I'm not able to build it for windows
> ce. Anybody can help me ?
> 

DBMSs are for storing data and doing *elementary* calculations on the data.

Why don't you do the calculation in VB?

Cheers,

John
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] "extension-functions.c" in windows mobile

2009-04-09 Thread Thibaut Gheysen
Hi,

I develop a windows mobile application in VB .Net (compact framework 2.0)
with SQLite and the ADO.net provider. In this application, I must calculate
the distance between 2 points for all items of a table. For this I need
"power" and "sqrt" function but these functions doesn't seem to be include
in SQLite core functions. I have found the "extension-functions.c" in the
contrib page of the SQLite website but I'm not able to build it for windows
ce. Anybody can help me ?

Best regards,
Thibaut.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Datatypes on the command line: can you simply rely on quote()?

2009-04-09 Thread John Machin
On 9/04/2009 8:40 PM, Florian v. Savigny wrote:
> 
> The question was serious, sincere, and earnest!
> 
>   > [It] seems [...] that the typeof() column adds no information that
>   > the quoted value itself does not provide.
> 
>   > So, can I simply use quote() [...] to determine the storage
>   > class SQLite uses?
> 
> It would really be of great help to know this! Is really nobody around
> who CAN answer it?

*You* can answer it.

Start with the documentation for the quote() function.
It says something like it converts the argument into a form that can be 
put into an SQL statement as a constant.
It would be an extremely Bad Thing (TM) if you and the SQL compiler's 
lexer could not look at a constant and decide very simply which of the 5 
basic types it was.

Starts with N => NULL
Starts with ' => Text
Starts with X => BLOB
Contains only decimal digits, optionally preceded by - => integer
Otherwise it's a float, and if it's not, it'd be fixed before you knew it.

HTH,
John



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Insert into with select not working

2009-04-09 Thread Martin.Engelschalk
Hello Brian,

you do not need a VALUE keyword in this case.

INSERT INTO "subscribers_new"
--VALUES  <- remove this
SELECT id, ip_address, added, 'aa:bb:cc:etc' from subscribers;

See the syntax diagram for the insert command: 
http://www.sqlite.org/lang_insert.html

Martin


Brian Zambrano schrieb:
> Can anyone explain to me why an insert with select statement isn't working?
> I know in my my example below I just have an extra column which I could have
> added, but my actual tables are a bit more complex and this below is just to
> demonstrate the problem.
>
> -- Original table
> CREATE TABLE "subscribers" (
> "id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
> "ip_address" char(15) NOT NULL UNIQUE,
> "added" integer NOT NULL
> );
>
> -- New table
> CREATE TABLE "subscribers_new" (
> "id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
> "ip_address" char(15) NOT NULL UNIQUE,
> "added" integer NOT NULL,
> "mac_address" char(32) NOT NULL
> );
> SQL error: near ""mac_address"": syntax error
>
> -- insert a couple of rows into the original
> INSERT INTO "subscribers" VALUES (1, '1.2.3.4', 123456);
> INSERT INTO "subscribers" VALUES (2, '11.22.33.44', 111);
>
> -- Now try to insert into new table with select, and see failure
> INSERT INTO "subscribers_new"
> VALUES
> SELECT id, ip_address, added, 'aa:bb:cc:etc' from subscribers;
> SQL error: near "SELECT": syntax error
>
> -- Note, the select statement by itself works just fine:
>
> SELECT id, ip_address, added, 'aa:bb:cc:etc' from subscribers;
> id|ip_address|added|'aa:bb:cc:etc'
> 1|1.2.3.4|123456|aa:bb:cc:etc
> 2|11.22.33.44|111|aa:bb:cc:etc
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Insert into with select not working

2009-04-09 Thread Brian Zambrano
Can anyone explain to me why an insert with select statement isn't working?
I know in my my example below I just have an extra column which I could have
added, but my actual tables are a bit more complex and this below is just to
demonstrate the problem.

-- Original table
CREATE TABLE "subscribers" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"ip_address" char(15) NOT NULL UNIQUE,
"added" integer NOT NULL
);

-- New table
CREATE TABLE "subscribers_new" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"ip_address" char(15) NOT NULL UNIQUE,
"added" integer NOT NULL,
"mac_address" char(32) NOT NULL
);
SQL error: near ""mac_address"": syntax error

-- insert a couple of rows into the original
INSERT INTO "subscribers" VALUES (1, '1.2.3.4', 123456);
INSERT INTO "subscribers" VALUES (2, '11.22.33.44', 111);

-- Now try to insert into new table with select, and see failure
INSERT INTO "subscribers_new"
VALUES
SELECT id, ip_address, added, 'aa:bb:cc:etc' from subscribers;
SQL error: near "SELECT": syntax error

-- Note, the select statement by itself works just fine:

SELECT id, ip_address, added, 'aa:bb:cc:etc' from subscribers;
id|ip_address|added|'aa:bb:cc:etc'
1|1.2.3.4|123456|aa:bb:cc:etc
2|11.22.33.44|111|aa:bb:cc:etc
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] trigger with transaction

2009-04-09 Thread Igor Tandetnik
"Simon Chen" 
wrote in message news:22964648.p...@talk.nabble.com
> Another related question, during rollback, would triggers be called?

No. Rollback works at the low level, by restoring whole pages in the 
database file. It doesn't work with individual records.

Igor Tandetnik 



___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Datatypes on the command line: can you simply rely on quote()?

2009-04-09 Thread Florian v. Savigny


The question was serious, sincere, and earnest!

  > [It] seems [...] that the typeof() column adds no information that
  > the quoted value itself does not provide.

  > So, can I simply use quote() [...] to determine the storage
  > class SQLite uses?

It would really be of great help to know this! Is really nobody around
who CAN answer it?

Florian

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Sqlite, vb6 and date time field

2009-04-09 Thread Rene Claassen
How can I convert it into a string through ODBC? Here is some of my data.

Date_Stamp
2009/03/16 10:52
2009/03/16 14:18
2009/03/16 14:20
2009/03/16 14:43
2009/03/16 15:10
2009/03/16 15:17
2009/03/16 15:23
2009/03/16 15:30
2009/03/16 15:32
2009/03/16 15:47

Rene


> -- Forwarded message --
> From: steven.far...@dds.net
> To: General Discussion of SQLite Database 
> Date: Wed, 8 Apr 2009 10:23:38 -0400
> Subject: Re: [sqlite] Sqlite, vb6 and date time field
> Can you provide maybe 10 samples of the dates on the database.  Some
> databases have a different date format and you might have to format the
> date or  convert it to a string and back into a date again.

>
> sqlite-users-boun...@sqlite.org wrote on 04/08/2009 06:20:09 AM:

> Hi
>
> I received a Sqlite database from someone, and they also gave me
> SQLite2008Pro together with the ODBC Driver. They want a front end to
> view/query the data that I'm building in vb6. One of the fields is a
> DateStamp with a datatype DateTime. When I try to display that field I
get
> an 'Invalid use of null' error (all the records have dates in that
field).
> I've also tried importing the data into Access, and it doesn't import
any of
> the dates. Can someone please help.
>
> Thank you,
> Rene
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Possible bug

2009-04-09 Thread Dan

On Apr 9, 2009, at 3:18 PM, Arthur Skowronek wrote:

> Griggs, Donald wrote:
>> This mailing list, like many, will automatically strip attachments.  
>> Posting onto your own webspace is a great way, as you have  
>> discovered,
> to reference files.
> Thank you for your advice :).
>
>>
>> I'm writing just to say that I *did* reproduce a problem.
>>
>> I'm using Windows XP SP3.
>>
>> I narrowed the problem to the sql below.  The fault occurs on the  
>> insert command.
>>
>> Using the windows binary for 3.6.11, I have no problem, but 3.6.12  
>> results in a fault.
>>
>> Changing the "DEFAULT  (datetime( 'now', 'localtime' )  )" to a  
>> simple constant such as 'puppies' avoids the fault.
>>
>> However, doing a simple:
>>SELECT datetime( 'now', 'localtime' );
>> does *not* cause a fault.
>
> And thank you for testing this. I could reproduce the problem
> here on two diffrent computers too. But what should I do now?
> How can I point a SQLite developer to this problem?

Looks like you have already achieved this. The bug has been fixed too:

   http://www.sqlite.org/cvstrac/tktview?tn=3791


> Kind regards,
> Arthur S.
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Possible bug

2009-04-09 Thread Arthur Skowronek
Griggs, Donald wrote:
> This mailing list, like many, will automatically strip attachments. Posting 
> onto your own webspace is a great way, as you have discovered,
to reference files.
Thank you for your advice :).

> 
> I'm writing just to say that I *did* reproduce a problem.
>
> I'm using Windows XP SP3.
> 
> I narrowed the problem to the sql below.  The fault occurs on the insert 
> command.
> 
> Using the windows binary for 3.6.11, I have no problem, but 3.6.12 results in 
> a fault.
> 
> Changing the "DEFAULT  (datetime( 'now', 'localtime' )  )" to a simple 
> constant such as 'puppies' avoids the fault.
> 
> However, doing a simple:
> SELECT datetime( 'now', 'localtime' );
> does *not* cause a fault.

And thank you for testing this. I could reproduce the problem
here on two diffrent computers too. But what should I do now?
How can I point a SQLite developer to this problem?

Kind regards,
 Arthur S.


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] what is the default for the commit when the connection is opened.

2009-04-09 Thread Joanne Pham
Thank a lot Jay





From: Jay A. Kreibich 
To: General Discussion of SQLite Database 
Sent: Wednesday, April 8, 2009 1:22:57 PM
Subject: Re: [sqlite] what is the default for the commit when the connection is 
opened.

On Wed, Apr 08, 2009 at 10:12:15PM +0200, Martin Engelschalk scratched on the 
wall:
> Hi,
> 
> sqlite does not know an "auto commit".

  Actually, that's what the default mode is called.  You're either in
  "autocommit" mode or you're in a transaction.  Starting a transaction
  turns off autocommit and committing/rolling back a transaction turns
  it back on.

  There is even an API call to ask what state things are in:

    int sqlite3_get_autocommit(sqlite3*);

  See: 
  http://www.sqlite.org/c3ref/get_autocommit.html
  http://www.sqlite.org/lockingv3.html#transaction_control

> If you do not call "begin transaction", then every insert/update/delete 
> statement is wrapped in its own transaction. This is like "auto commit"

  In the context of SQLite this *is* autocommit.  Each statement is
  wrapped in an automatic transaction.

> If you do call "begin transaction", you start a transaction which you 
> have to finish with "commit" or "rollback".

> This does not depend on how you open the database.

  No, but you always start out in autocommit mode, since you're not
  inside an explicit transaction.

  -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Our opponent is an alien starship packed with atomic bombs.  We have
a protractor."  "I'll go home and see if I can scrounge up a ruler
and a piece of string."  --from Anathem by Neal Stephenson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



  
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users