Re: [sqlite] How to run the test cases

2008-11-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Avinash Mittal wrote:
> I have built a rpm package for SQLite-3.6.4, now i want to do self test for
> the package. 

It is best to do the testing during the build process as it needs
alternate compilations of the source (for example to do fault
injection).  Note that you will need the TCL development libraries
available as TCL is used to drive the testing.

If you start from the full source (eg sqlite-3.6.5.tar.gz) then the
following sequence works:

 $ ./configure --prefix=
 $ make
 $ make test
 $ make install # done from rpm so DESTDIR is correctly set

'make test' takes about 25 seconds to execute.  There is an even more
detailed test 'make fulltest' which takes way longer (I got bored after
waiting 7 minutes).

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkkbxJ8ACgkQmOOfHg372QR68QCff4f1mNE+LctuBIchIlkkTblz
cZ8An3Bop8l6bhZ2lDoZTgCb/HEh7HHB
=BLZc
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to read whole table with a BLOB cloumn as quickly as possible?

2008-11-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

钱晓明 wrote:
> I want to store image data into sqlite by spliting image to many
> blocks(256*256pixels).

Why are you splitting it?  You can use the incremental blob api for
access http://sqlite.org/c3ref/blob_open.html

> The table has the 32K page size,
> and I make these pragma: journal_mode = OFF, synchronous = OFF, locking_mode
> = EXCLUSIVE, temp_store = MEMORY, compiling sqlite3 with no thread safety.

At this point you aren't really using SQLite as a database, but more
like a container with SQL queries and easily corrupted.

> I have a image file about 400M, in tiff format.

You would likely be far better off using the filesystem to store the
tiles and then storing the filenames in the database.  As a bonus the
image API you use will be able to directly load the tiles.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkkbvvUACgkQmOOfHg372QSdTwCfd4v7V52+ICGt5+IXueUDFha7
ox4An2IrDiqcOBeCG+KnwrGY4um+Cd2a
=VL+4
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite insert and delete statements not succeed

2008-11-12 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

henry wrote:
> The problem is the next time
> when I connect the Sqlite, the actions I did last time has all gone
> away, it did not take any effect to the database. There's no error code
> when using the sqlite api, and if I use that handler to query the
> database, the inserted data is there. 

What are you using to access the SQLite api?  The above cannot happen if
you are using the C api directly.  If you are using another programming
language and wrapper then it is possible the wrapper is managing
transactions behind your back.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkkbvW4ACgkQmOOfHg372QQdWQCfUNavXIkHP6a7GWcgmQMFOiLZ
YT0AoIQH7KWg/clSlxjlkuKUlhuTGsO9
=S24q
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Program crashes when delete a row in SQLite db table

2008-11-12 Thread Nithin John
Hi,

The problem is that the process is crashing without giving me a
chance to detect the error and recover from the situation. How can I
prevent that?

How can I programatically find out the the corrupted rows? If I can
find these rows I can work around them.

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


Re: [sqlite] sqlite insert and delete statements not succeed

2008-11-12 Thread henry
Hi P Kishor, 
I dont use transactions, and I dont commit.
Do I have to commit even if I dont use transactions?
BTW, my sqlite version is 3.4.0
Thanks for your reply
On Wed, 2008-11-12 at 21:48 -0600, P Kishor wrote:
> On 11/12/08, henry <[EMAIL PROTECTED]> wrote:
> > hey,
> >  I'm a rookie to SQLITE, recently I tried to use Sqlite to integrate with
> >  my app, I opened a database handler, insert some records, delete some
> >  records, then closed the database handler. The problem is the next time
> >  when I connect the Sqlite, the actions I did last time has all gone
> >  away, it did not take any effect to the database. There's no error code
> >  when using the sqlite api, and if I use that handler to query the
> >  database, the inserted data is there.
> >
> 
> Is your application using transactions? Did you forget to commit?
> 
> 
> >  Thanks in advance
> >  regards
> ___
> 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] How to Modify Table

2008-11-12 Thread jonwood

My database contains the following table:

m_Database.ExecNonQuery(_T("CREATE TABLE Vehicles (")
  _T("VehicleID INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,")
  _T("FK_CustomerID INTEGER NOT NULL,")
  _T("VehicleNumber INTEGER NOT NULL,")
  _T("VehicleTitle TEXT,")
  _T("VehicleMake TEXT,")
  _T("VehicleModel TEXT,")
  _T("VehicleYear TEXT,")
  _T("VehicleVIN TEXT,")
  _T("VehicleDescription TEXT,")
  _T("Active INTEGER DEFAULT 1 NOT NULL,")
  _T("CreateDate DATE DEFAULT (date('now','localtime')) NOT NULL,")
  _T("UNIQUE (FK_CustomerID, VehicleID))"));

I would like to change the last line to instead be:

  _T("UNIQUE (FK_CustomerID, VehicleNumber))"));

Is there any way to make this change to the existing table without losing
data in the table?

Thanks for any suggestions!
-- 
View this message in context: 
http://www.nabble.com/How-to-Modify-Table-tp20474500p20474500.html
Sent from the SQLite mailing list archive at Nabble.com.

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


Re: [sqlite] sqlite insert and delete statements not succeed

2008-11-12 Thread P Kishor
On 11/12/08, henry <[EMAIL PROTECTED]> wrote:
> hey,
>  I'm a rookie to SQLITE, recently I tried to use Sqlite to integrate with
>  my app, I opened a database handler, insert some records, delete some
>  records, then closed the database handler. The problem is the next time
>  when I connect the Sqlite, the actions I did last time has all gone
>  away, it did not take any effect to the database. There's no error code
>  when using the sqlite api, and if I use that handler to query the
>  database, the inserted data is there.
>

Is your application using transactions? Did you forget to commit?


>  Thanks in advance
>  regards
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] sqlite insert and delete statements not succeed

2008-11-12 Thread henry
hey, 
I'm a rookie to SQLITE, recently I tried to use Sqlite to integrate with
my app, I opened a database handler, insert some records, delete some
records, then closed the database handler. The problem is the next time
when I connect the Sqlite, the actions I did last time has all gone
away, it did not take any effect to the database. There's no error code
when using the sqlite api, and if I use that handler to query the
database, the inserted data is there. 

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


[sqlite] (no subject)

2008-11-12 Thread Rick Pritchett

I am resending my transactions based on the result code that is returned. 
Should I put the time out command in my loops or once set does time out apply to
each transaction despite the resends?  



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


[sqlite] How to read whole table with a BLOB cloumn as quickly as possible?

2008-11-12 Thread 钱晓明
Hello,
I want to store image data into sqlite by spliting image to many
blocks(256*256pixels). In my table, each row contain one block and some
other information, about 4~7column totally. The table has the 32K page size,
and I make these pragma: journal_mode = OFF, synchronous = OFF, locking_mode
= EXCLUSIVE, temp_store = MEMORY, compiling sqlite3 with no thread safety.
I have a image file about 400M, in tiff format. I import it inot sqlite
database, get a table with 9000 row( every row contain a 64K blob). If I
read all image data by SELECT statment:
 SELECT ROWNUM, COLNUM, GEOR FROM RDT_1(GEOR is the image blob
column)
it would tabke almost 18 seconds to read all image blob. Almost all time is
consumed by sqlite3_step(). But If I read tif file directly by GDAL, it only
take 8 seconds to get all data.
Is there any strategy I can followed to improve the blob read? Accessing any
blob in sqlite is very quickly, but now I have to read all blob in a large
table, so how can I read as quickly as possible?

Thank you for any suggestion and discuss! And if there is a sloution in some
where, please give me a url. Thanks!
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] FTS 3 Crash in 3.6.5

2008-11-12 Thread Shawn Wilsher
Hey all,

I seem to have found a crash that is 100% reproducible in SQLite 3.6.5.  I'm
managed to make a reduced test case in a C file that can be found here:
http://files.shawnwilsher.com/2008/11/12/test.c

The file is compiled with the following command:
gcc sqlite3.c test.c -DSQLITE_SECURE_DELETE=1 -DTHREADSAFE=1 -DSQLITE_CORE=1
-DSQLITE_ENABLE_FTS3=1

The program crashes when we try to commit the transaction with the following
stack trace:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x
0x0005d258 in sqlite3VtabSync (db=0x100168, pzErrmsg=0x101b58) at
sqlite3.c:75690
75690  for(i=0; rc==SQLITE_OK && inVTrans && aVTrans[i]; i++){
(gdb) bt
#0  0x0005d258 in sqlite3VtabSync (db=0x100168, pzErrmsg=0x101b58) at
sqlite3.c:75690
#1  0x00024d47 in vdbeCommit (db=0x100168, p=0x101ac8) at sqlite3.c:42890
#2  0x0002550e in sqlite3VdbeHalt (p=0x101ac8) at sqlite3.c:43230
#3  0x000291a9 in sqlite3VdbeExec (p=0x101ac8) at sqlite3.c:46357
#4  0x000272b1 in sqlite3Step (p=0x101ac8) at sqlite3.c:44607
#5  0x0002757a in sqlite3_step (pStmt=0x101ac8) at sqlite3.c:44671
#6  0x0006e54e in segdir_max_index (v=0x102108, iLevel=0, pidx=0xbfffed98)
at sqlite3.c:87702
#7  0x000744d4 in segdirNextIndex (v=0x102108, iLevel=0, pidx=0xbfffed98) at
sqlite3.c:90949
#8  0x000754b7 in writeZeroSegment (v=0x102108, pTerms=0x1021c4) at
sqlite3.c:91477
#9  0x0007574d in flushPendingTerms (v=0x102108) at sqlite3.c:91535
#10 0x00075a50 in fulltextSync (pVtab=0x102108) at sqlite3.c:91643
#11 0x0005d20a in sqlite3VtabSync (db=0x100168, pzErrmsg=0x101228) at
sqlite3.c:75695
#12 0x00024d47 in vdbeCommit (db=0x100168, p=0x101198) at sqlite3.c:42890
#13 0x0002550e in sqlite3VdbeHalt (p=0x101198) at sqlite3.c:43230
#14 0x0002c0e3 in sqlite3VdbeExec (p=0x101198) at sqlite3.c:47952
#15 0x000272b1 in sqlite3Step (p=0x101198) at sqlite3.c:44607
#16 0x0002757a in sqlite3_step (pStmt=0x101198) at sqlite3.c:44671
#17 0x0004a9aa in sqlite3_exec (db=0x100168, zSql=0x7ffca "COMMIT
TRANSACTION", xCallback=0, pArg=0x0, pzErrMsg=0x0) at sqlite3.c:65582
#18 0x000790b9 in main () at test.c:25

Cheers,

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


Re: [sqlite] testing for "cannot commit transaction - SQL statements in progress"

2008-11-12 Thread D. Richard Hipp

On Nov 12, 2008, at 3:24 PM, Gene Allen wrote:

> Sometimes when I do a sqlite3_exec with the sql "Commit;" I get a
> SQLITE_ERROR returned and the error text is "cannot commit  
> transaction - SQL
> statements in progress"
>
>
>
> If I wait for a few seconds and try the sqlite3_exec again, the works
> correctly. (testing in the debugger)
>
>
>
> Is there anyway to test for this condition so I handle it properly?


The situation you describe does not occur in SQLite version 3.6.5.

D. Richard Hipp
[EMAIL PROTECTED]



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


[sqlite] testing for "cannot commit transaction - SQL statements in progress"

2008-11-12 Thread Gene Allen
Sometimes when I do a sqlite3_exec with the sql "Commit;" I get a
SQLITE_ERROR returned and the error text is "cannot commit transaction - SQL
statements in progress"

 

If I wait for a few seconds and try the sqlite3_exec again, the works
correctly. (testing in the debugger)

 

Is there anyway to test for this condition so I handle it properly?  

 

Gene Allen

 

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


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread Baskaran Selvaraj

Thanks roosevelt. I will try to use the c# command.
 
> Date: Wed, 12 Nov 2008 15:03:41 -0500> From: [EMAIL PROTECTED]> To: 
> sqlite-users@sqlite.org> Subject: Re: [sqlite] SQLite Import Tool> > I wrote 
> a simple c# command line program that will import data from> MSSQL into a 
> sqlite database. You specify a query (for MSSQL), a> connection string, the 
> location of the sqlite database file, and a> table in the sqlite database and 
> the app dumps the results of the> query into the table. You could easily use 
> it in a batch file to> accomplish what you need. If you want the app, I could 
> send it to you.> > On Wed, Nov 12, 2008 at 9:45 AM, Baskaran Selvaraj> 
> <[EMAIL PROTECTED]> wrote:> >> >> > Hi All,> > This is Baskaran and I am 
> looking for a vendor tool to automate the import process.> > We have an 
> application which is written to use SQLite database. Right now, I import the 
> data> > into SQLite database from SQL Server 2005 manually. Looking for a 
> vendor software, which can used> > to automate the process of importing the 
> data from SQL Server 2005 to SQLite database> > on a daily basis> > .> > 
> Thanks> > Baskaran Selvaraj, DBA> >> > 
> _> > See how 
> Windows(R) connects the people, information, and fun that are part of your 
> life> > http://clk.atdmt.com/MRT/go/119463819/direct/01/> > 
> ___> > 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
_
Windows Live Hotmail now works up to 70% faster.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_faster_112008
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread Roosevelt Anderson
I wrote a simple c# command line program that will import data from
MSSQL into a sqlite database. You specify a query (for MSSQL), a
connection string, the location of the sqlite database file, and a
table in the sqlite database and the app dumps the results of the
query into the table. You could easily use it in a batch file to
accomplish what you need. If you want the app, I could send it to you.

On Wed, Nov 12, 2008 at 9:45 AM, Baskaran Selvaraj
<[EMAIL PROTECTED]> wrote:
>
>
> Hi All,
> This is Baskaran and I am looking for a vendor tool to automate the import 
> process.
> We have an application which is written to use SQLite database. Right now, I 
> import the data
> into SQLite database from SQL Server 2005 manually. Looking for a vendor 
> software, which can used
> to automate the process of importing the data from SQL Server 2005 to SQLite 
> database
> on a daily basis
> .
> Thanks
> Baskaran Selvaraj, DBA
>
> _
> See how Windows(R) connects the people, information, and fun that are part of 
> your life
> http://clk.atdmt.com/MRT/go/119463819/direct/01/
> ___
> 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] count duplicates in the table coloumn

2008-11-12 Thread P Kishor
On 11/12/08, baxy77bax <[EMAIL PROTECTED]> wrote:
>
>  hi,
>  my question is: Is there a way to count the number of specific data in the
>  column of a table, for example:
>
>  let say i have a table like this:
>  numbers
>  1
>  2
>  2
>  3
>  4
>  4
>  4
>  ...
>  and i would like to report my data in form:
>  numbers | count
>  1 | 1
>  2 | 2
>  3 | 1
>  4 | 3
>  ...


SQLite version 3.5.9
Enter ".help" for instructions
sqlite> create table foo (a);
sqlite> insert into foo values (1);
sqlite> insert into foo values (2);
sqlite> insert into foo values (2);
sqlite> insert into foo values (3);
sqlite> insert into foo values (4);
sqlite> insert into foo values (4);
sqlite> insert into foo values (4);
sqlite> select * from foo;
1
2
2
3
4
4
4
sqlite> select a, count(a) from foo;
4|7
sqlite> select a, count(a) from foo group by a;
1|1
2|2
3|1
4|3
sqlite>


>
>  so far i have been doing this by using sql count function and looping it
>  through perl , but now i'm looking for a faster way to do this, so if
>  anybody has an idea ...
>  thank you!
>
> --
>  View this message in context: 
> http://www.nabble.com/count-duplicates-in-the-table-coloumn-tp20467510p20467510.html
>  Sent from the SQLite mailing list archive at Nabble.com.
>
>  ___
>  sqlite-users mailing list
>  sqlite-users@sqlite.org
>  http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] count duplicates in the table coloumn

2008-11-12 Thread baxy77bax

hi,
my question is: Is there a way to count the number of specific data in the
column of a table, for example:

let say i have a table like this:
numbers
1
2
2
3
4
4
4
...
and i would like to report my data in form:
numbers | count
1 | 1
2 | 2
3 | 1
4 | 3
...

so far i have been doing this by using sql count function and looping it
through perl , but now i'm looking for a faster way to do this, so if
anybody has an idea ...
thank you!   
-- 
View this message in context: 
http://www.nabble.com/count-duplicates-in-the-table-coloumn-tp20467510p20467510.html
Sent from the SQLite mailing list archive at Nabble.com.

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


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread Thomas Briggs
   If I had to guess I'd say that the performance problems are
transaction related.  Switching to text file export/import will give
you an opportunity to solve that problem.

   -T


On Wed, Nov 12, 2008 at 11:29 AM, Baskaran Selvaraj
<[EMAIL PROTECTED]> wrote:
>
> Thanks Tom. I tried using DTS but the import process is taking hours
> and most of the time it fails at the end with timeout.
>
>> Date: Wed, 12 Nov 2008 09:58:36 -0500> From: [EMAIL PROTECTED]> To: 
>> sqlite-users@sqlite.org> Subject: Re: [sqlite] SQLite Import Tool> > You can 
>> probably do it with the two systems' command line tools> (generate a text 
>> file with one and read it with the other). DTS/SSIS> will probably do the 
>> trick for you too.> > In short: don't over-complicate things. :)> > -T> > On 
>> Wed, Nov 12, 2008 at 9:45 AM, Baskaran Selvaraj> <[EMAIL PROTECTED]> wrote:> 
>> >> >> > Hi All,> > This is Baskaran and I am looking for a vendor tool to 
>> automate the import process.> > We have an application which is written to 
>> use SQLite database. Right now, I import the data> > into SQLite database 
>> from SQL Server 2005 manually. Looking for a vendor software, which can 
>> used> > to automate the process of importing the data from SQL Server 2005 
>> to SQLite database> > on a daily basis> > .> > Thanks> > Baskaran Selvaraj, 
>> DBA> >> > _> 
>> > See how Windows(R) connects the people, information, and fun that are part 
>> of your life> > http://clk.atdmt.com/MRT/go/119463819/direct/01/> > 
>> ___> > 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
> _
> Color coding for safety: Windows Live Hotmail alerts you to suspicious email.
> http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_safety_112008
> ___
> 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] SQLite Import Tool

2008-11-12 Thread P Kishor
> On Nov 12, 2008, at 11:52 AM, Baskaran Selvaraj wrote:
>
> Thanks Kishore but I am exporting data from SQL Server and importing
> into SQLite database.

Thanks for the update, but I am not sure how that changes what I
suggested. A few lines of Perl (or whatever language you prefer) will
automate data going either way. Set a cron task for your script and it
will get done on schedule.

Perl has competent DBDs for both SQL Server and SQLite.

Finally, please reply to the list as there many on the list far more
knowledgeable than I in all matters relating to life, the universe and
databases.

Good luck.



> Date: Wed, 12 Nov 2008 11:12:04 -0600
> From: [EMAIL PROTECTED]
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] SQLite Import Tool
>
> On 11/12/08, Baskaran Selvaraj <[EMAIL PROTECTED]> wrote:
> >
> > Hi Donald,
> > 1. Size of the SQLite Database : 43 MB.
> > 2. Number of tables : 45
> > 3. Maximum number of rows in a table is around 75,000
>
>
> Why don't you just dump the SQLite db and import that into SQL Server?
> If you want to automate that, a few lines of Perl will do the job more
> quickly than an elongated thread on the mailing list.
>
>
> >
> > We initially tried with few tables and it was not always successful but 
> > after we got to 45 tables,
> > we did not use SQLite ODBC driver at all.
> >
> > Rght now, I am using SQL Maestro Data Wizard. This tool has a feature to 
> > automate data import using templates
> > but since we have exceed the ini file limitation of 64 KB, I have to run it 
> > using the wizard each time not automation.
> > Right now, using the Data Wizard tool, it takes like 30 minutes to import 
> > all the data.
> >
> > Thanks
> > Baskaran
> > > Date: Wed, 12 Nov 2008 11:46:16 -0500> From: [EMAIL PROTECTED]> To: 
> > > sqlite-users@sqlite.org> Subject: Re: [sqlite] SQLite Import Tool> > 
> > > Greetings, Baskaran,> > Regarding: "SQLite ODBC driver takes hours for 
> > > data transfer and most of> the time it is not success."> > > Rather than 
> > > folks on the list providing method after method, it might be> helpful for 
> > > you to give some further information, such as:> > -- Just approximately, 
> > > how much data are you converting regularly.> I.e., how many megabytes , 
> > > tables, and rows are involved?> > > -- You mention that you are now doing 
> > > this "manually". Could you> elaborate? Does this mean you're dumping the 
> > > data to some text format,> then importing into sqlite with, perhaps the 
> > > sqlite3.exe> command-line-tool? If so, might simply adding a batch script 
> > > to this> process give you the automation you need? > > -- How long does 
> > > the manual conversion take to run? > > -- Have you determined which of 
> > > your tables is giving you the problem?> How far into your conversion are 
> > > you getting?> > ___> 
> > > sqlite-users mailing list>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Update is it correct???

2008-11-12 Thread Ernany
UPDATE???

table : PROD

table: NewPROD

codigo

descriçao

qtde

codigo

descriçao

qtde

1

banana

10

3

nada

10

2

abacaxi

20

4

tudo

20

3

nada

30

5

cinco

30

4

tudo
 dwww







5

cinco

50







6

seis

60







7

sete

70







8

oito

80







 UPDATE PROD SET qtde = (SELECT NewPROD.qtde FROM NewProd WHERE
NewPROD.codigo = PROD.codigo)

Is it POSSIBLE??

table : PROD

codigo

descriçao

qtde

1

banana

10

2

abacaxi

20

3

nada

10

4

tudo

20

5

cinco

30

6

seis

60

7

sete

70

8

oito

80

Thanks a lot,


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


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread P Kishor
On 11/12/08, Baskaran Selvaraj <[EMAIL PROTECTED]> wrote:
>
>  Hi Donald,
>   1. Size of the SQLite Database : 43 MB.
>   2. Number of tables  : 45
>   3. Maximum number of rows in a table is around 75,000


Why don't you just dump the SQLite db and import that into SQL Server?
If you want to automate that, a few lines of Perl will do the job more
quickly than an elongated thread on the mailing list.


>
>  We initially tried with few tables  and it was not always successful but 
> after we got to 45 tables,
>  we did not use SQLite ODBC driver at all.
>
>  Rght now, I am using SQL Maestro Data Wizard. This tool has a feature to 
> automate data import using templates
>  but since we have exceed the ini file limitation of 64 KB, I have to run it 
> using the wizard each time not automation.
>  Right now, using the Data Wizard tool, it takes like 30 minutes to import 
> all the data.
>
>  Thanks
>  Baskaran
>  > Date: Wed, 12 Nov 2008 11:46:16 -0500> From: [EMAIL PROTECTED]> To: 
> sqlite-users@sqlite.org> Subject: Re: [sqlite] SQLite Import Tool> > 
> Greetings, Baskaran,> > Regarding: "SQLite ODBC driver takes hours for data 
> transfer and most of> the time it is not success."> > > Rather than folks on 
> the list providing method after method, it might be> helpful for you to give 
> some further information, such as:> > -- Just approximately, how much data 
> are you converting regularly.> I.e., how many megabytes , tables, and rows 
> are involved?> > > -- You mention that you are now doing this "manually". 
> Could you> elaborate? Does this mean you're dumping the data to some text 
> format,> then importing into sqlite with, perhaps the sqlite3.exe> 
> command-line-tool? If so, might simply adding a batch script to this> process 
> give you the automation you need? > > -- How long does the manual conversion 
> take to run? > > -- Have you determined which of your tables is giving you 
> the problem?> How far into your conversion are you getting?> > 
> ___> sqlite-users mailing list> 
> sqlite-users@sqlite.org> 
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
> _
>  See how Windows(R) connects the people, information, and fun that are part 
> of your life
>  http://clk.atdmt.com/MRT/go/119463819/direct/01/
>  ___
>
> sqlite-users mailing list
>  sqlite-users@sqlite.org
>  http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread Baskaran Selvaraj

Hi Donald,
 1. Size of the SQLite Database : 43 MB.
 2. Number of tables  : 45
 3. Maximum number of rows in a table is around 75,000
 
We initially tried with few tables  and it was not always successful but after 
we got to 45 tables, 
we did not use SQLite ODBC driver at all.
 
Rght now, I am using SQL Maestro Data Wizard. This tool has a feature to 
automate data import using templates
but since we have exceed the ini file limitation of 64 KB, I have to run it 
using the wizard each time not automation.
Right now, using the Data Wizard tool, it takes like 30 minutes to import all 
the data.
 
Thanks
Baskaran
> Date: Wed, 12 Nov 2008 11:46:16 -0500> From: [EMAIL PROTECTED]> To: 
> sqlite-users@sqlite.org> Subject: Re: [sqlite] SQLite Import Tool> > 
> Greetings, Baskaran,> > Regarding: "SQLite ODBC driver takes hours for data 
> transfer and most of> the time it is not success."> > > Rather than folks on 
> the list providing method after method, it might be> helpful for you to give 
> some further information, such as:> > -- Just approximately, how much data 
> are you converting regularly.> I.e., how many megabytes , tables, and rows 
> are involved?> > > -- You mention that you are now doing this "manually". 
> Could you> elaborate? Does this mean you're dumping the data to some text 
> format,> then importing into sqlite with, perhaps the sqlite3.exe> 
> command-line-tool? If so, might simply adding a batch script to this> process 
> give you the automation you need? > > -- How long does the manual conversion 
> take to run? > > -- Have you determined which of your tables is giving you 
> the problem?> How far into your conversion are you getting?> > 
> ___> sqlite-users mailing list> 
> sqlite-users@sqlite.org> 
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_
See how Windows® connects the people, information, and fun that are part of 
your life
http://clk.atdmt.com/MRT/go/119463819/direct/01/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread Griggs, Donald
Greetings, Baskaran,

Regarding: "SQLite ODBC driver takes hours for data transfer and most of
the time it is not success."


Rather than folks on the list providing method after method, it might be
helpful for you to give some further information, such as:

-- Just approximately, how much data are you converting regularly.
I.e., how many megabytes , tables, and rows are involved?


-- You mention that you are now doing this "manually".   Could you
elaborate?   Does this mean you're dumping the data to some text format,
then importing into sqlite with, perhaps the sqlite3.exe
command-line-tool? If so, might simply adding a batch script to this
process give you the automation you need?  

--  How long does the manual conversion take to run?  

-- Have you determined which of your tables is giving you the problem?
How far into your conversion are you getting?

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


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread Baskaran Selvaraj

Thanks.  SQLite ODBC driver takes hours for data transfer and most of the time 
it is not success.
 
 
> Date: Wed, 12 Nov 2008 12:56:19 -0200> From: [EMAIL PROTECTED]> To: 
> sqlite-users@sqlite.org> Subject: Re: [sqlite] SQLite Import Tool> > Hi> > 
> You can use SQLite ODBC Driver and SQL Management Studio Data Transfer> 
> Wizard to perform this action.> > On Wed, Nov 12, 2008 at 12:45 PM, Baskaran 
> Selvaraj <> [EMAIL PROTECTED]> wrote:> > >> >> > Hi All,> > This is Baskaran 
> and I am looking for a vendor tool to automate the import> > process.> > We 
> have an application which is written to use SQLite database. Right now,> > I 
> import the data> > into SQLite database from SQL Server 2005 manually. 
> Looking for a vendor> > software, which can used> > to automate the process 
> of importing the data from SQL Server 2005 to> > SQLite database> > on a 
> daily basis> > .> > Thanks> > Baskaran Selvaraj, DBA> >> > 
> _> > See how 
> Windows(R) connects the people, information, and fun that are part of> > your 
> life> > http://clk.atdmt.com/MRT/go/119463819/direct/01/> > 
> ___> > 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
_
See how Windows® connects the people, information, and fun that are part of 
your life
http://clk.atdmt.com/MRT/go/119463819/direct/01/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread Baskaran Selvaraj

Thanks Tom. I tried using DTS but the import process is taking hours
and most of the time it fails at the end with timeout.
 
> Date: Wed, 12 Nov 2008 09:58:36 -0500> From: [EMAIL PROTECTED]> To: 
> sqlite-users@sqlite.org> Subject: Re: [sqlite] SQLite Import Tool> > You can 
> probably do it with the two systems' command line tools> (generate a text 
> file with one and read it with the other). DTS/SSIS> will probably do the 
> trick for you too.> > In short: don't over-complicate things. :)> > -T> > On 
> Wed, Nov 12, 2008 at 9:45 AM, Baskaran Selvaraj> <[EMAIL PROTECTED]> wrote:> 
> >> >> > Hi All,> > This is Baskaran and I am looking for a vendor tool to 
> automate the import process.> > We have an application which is written to 
> use SQLite database. Right now, I import the data> > into SQLite database 
> from SQL Server 2005 manually. Looking for a vendor software, which can used> 
> > to automate the process of importing the data from SQL Server 2005 to 
> SQLite database> > on a daily basis> > .> > Thanks> > Baskaran Selvaraj, DBA> 
> >> > _> > See 
> how Windows(R) connects the people, information, and fun that are part of 
> your life> > http://clk.atdmt.com/MRT/go/119463819/direct/01/> > 
> ___> > 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
_
Color coding for safety: Windows Live Hotmail alerts you to suspicious email.
http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_safety_112008
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLite version 3.6.5

2008-11-12 Thread D. Richard Hipp
SQLite version 3.6.5 is now available for download from the SQLite  
website:

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

There have been many bug fixes, but all bugs fixed seem to be obscure  
so there is no compelling reason to update if whatever version of  
SQLite you are currently using is working well for you.

An overview of the changes in version 3.6.5 can be found at

http://www.sqlite.org/releaselog/3_6_5.html

Please report any problems to the sqlite-users@sqlite.org mailing list  
or via tickets at http://www.sqlite.org/cvstrac/tktnew or by direct  
email to me.

D. Richard Hipp
[EMAIL PROTECTED]



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


[sqlite] Value of sqlite3_bind_text and return type of sqlite3_column_text

2008-11-12 Thread Eugene Wee
Hi everyone,

I have been puzzled for quite some time as to why, in the SQLite C API, 
sqlite3_bind_text() takes a const char* as its third argument but 
sqlite3_column_text() returns a const unsigned char* instead.

Should they not involve the same type since one is a string input 
function while the other is the corresponding string output function?

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


[sqlite] SQLite Import Tool

2008-11-12 Thread Baskaran Selvaraj


Hi All,
This is Baskaran and I am looking for a vendor tool to automate the import 
process.
We have an application which is written to use SQLite database. Right now, I 
import the data
into SQLite database from SQL Server 2005 manually. Looking for a vendor 
software, which can used
to automate the process of importing the data from SQL Server 2005 to SQLite 
database
on a daily basis
.
Thanks
Baskaran Selvaraj, DBA
 
_
See how Windows® connects the people, information, and fun that are part of 
your life
http://clk.atdmt.com/MRT/go/119463819/direct/01/
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Import Tool

2008-11-12 Thread Virgilio Fornazin
Hi

You can use SQLite ODBC Driver and SQL Management Studio Data Transfer
Wizard to perform this action.

On Wed, Nov 12, 2008 at 12:45 PM, Baskaran Selvaraj <
[EMAIL PROTECTED]> wrote:

>
>
> Hi All,
> This is Baskaran and I am looking for a vendor tool to automate the import
> process.
> We have an application which is written to use SQLite database. Right now,
> I import the data
> into SQLite database from SQL Server 2005 manually. Looking for a vendor
> software, which can used
> to automate the process of importing the data from SQL Server 2005 to
> SQLite database
> on a daily basis
> .
> Thanks
> Baskaran Selvaraj, DBA
>
> _
> See how Windows(R) connects the people, information, and fun that are part of
> your life
> http://clk.atdmt.com/MRT/go/119463819/direct/01/
> ___
> 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] Program crashes when delete a row in SQLite db table

2008-11-12 Thread Griggs, Donald
Hi, Nithin,

Regarding: Corrupted db attached, the qyery crashes is:
delete from 
   objects where dbname='information_schama' 

If it helps, it may be that a single record is giving you trouble, 
  Namely, in table "objects", rowid=2356;


I was apparently successful in obtaining all the other data using:
   CREATE objectsNEW as 
   SELECT * FROM objects WHERE ROWID <> 2356;

Maybe this helps,
   Donald
 

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


Re: [sqlite] DISTINCT clause bug in 3.6.4?

2008-11-12 Thread Dan
> I'm expecting the query to return 456 followed by XYZ. But instead it
> returns 123 followed by 456. If I remove the DISTINCT clause it  
> returns
> what I'm expecting but that doesn't seem like it should matter. I
> searched for bugs using the timeline in the wiki but didn't see  
> anything
> related to DISTINCT. I'm not sure where else to look...
>
> Is this a bug in sqlite or my query?

A bug. Fixed now:

   http://www.sqlite.org/cvstrac/chngview?cn=5889



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