[sqlite] sqlite Exception System.InvalidCastException: Specified cast is not valid.

2009-06-17 Thread Seysan
This is the Code in C#: SQLiteDataReader rdr; SQLiteCommand contentCommand; String cmd = String.Format(SELECT filename,content,filesize FROM documents WHERE did={0},did); contentCommand = sqlconn.CreateCommand();

Re: [sqlite] How to how many memory is used by sqlite

2009-06-17 Thread pierr
D. Richard Hipp wrote: On Jun 15, 2009, at 9:04 AM, pierr wrote: Hi all, I am using an memory type sqlite database in our embedded application. After the applicate run a while ,the system will run ourt of out of memory. So, is there a way to know how many memory is used by

[sqlite] SQLite (SQ3) Interfacing with SQL Server 2005 Standard Edition.

2009-06-17 Thread David Cawley
Users, I have a requirement to have two separate databases, MS SQL Server 2005 Standard Edition and SQLite (SQ3) interface to avoid duplication of certain data. The preference of the project is to have the SQL Server 2005 database populated and then duplicate and insert data directly into

Re: [sqlite] Sqlite3 database upgrade from 3.5.4 to 3.6.15 issue

2009-06-17 Thread Kalyani Phadke
if I create dump using sqlite3.5.4 and recreate DB using that dump data using sqlite3.5.4,everything works fine. if I create dump using sqlite3.5.4 and recreate DB using that dump data using sqlite3.6.15,gets error. Pls find attached file. The text generated from .dump command of sqlite3 version

[sqlite] Reading Blob/Writing to File in C# 2008

2009-06-17 Thread AFShin Abdollahi
Hello, I'm Using System.Data.SQLite in VS 2008 C#. I'm using DataReader to read the data. Everything works find except the BLOB. I want to get that Blob and Write it to a File. Blob data is mostly Picture and Music. Here a bit of Code: did- is the document id. String cmd =

[sqlite] Reading Blob/Writing to File in C# 2008

2009-06-17 Thread AFShin Abdollahi
When I used your code I get: No current row If I use: rdr.Read(); before your code, I get the same exception as before. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] sendfile from the DB

2009-06-17 Thread Philipp Marek
Hello everybody, I already saw this discussed in 2006 (see http://www.mail-archive.com/sqlite-users@sqlite.org/msg14703.html), but there was no final answer. I'm thinking about storing some bigger data blocks in a database, or, if that's not efficiently doable, address files in the filesystem

[sqlite] why is the data file locked after writing?

2009-06-17 Thread liubin liu
why is the data file locked after writing? the last printf() result is: # IN END, ret = 5 according to the Result Codes: #define SQLITE_BUSY 5 /* The database file is locked */ It means to the database file is locked? why does it happen after writing?

Re: [sqlite] why is the data file locked after writing?

2009-06-17 Thread Igor Tandetnik
liubin liu wrote: why is the data file locked after writing? the last printf() result is: # IN END, ret = 5 Because you still have a statement in progress. Finalize it with sqlite3_finalize. Igor Tandetnik ___ sqlite-users mailing list

Re: [sqlite] sqlite Exception System.InvalidCastException: Specified cast is not valid.

2009-06-17 Thread Joel Lucsy
On Wed, Jun 17, 2009 at 2:18 AM, Seysanafsh...@gmail.com wrote: I get the Exception there!  sqlite Exception System.InvalidCastException: Specified cast is not valid. The GetFieldType Shows: Systes.Byte[] Couldn't find my code where I've done it at. Tho I did find that I used a

Re: [sqlite] How to how many memory is used by sqlite

2009-06-17 Thread pierr
pierr wrote: D. Richard Hipp wrote: On Jun 15, 2009, at 9:04 AM, pierr wrote: Hi all, I am using an memory type sqlite database in our embedded application. After the applicate run a while ,the system will run ourt of out of memory. So, is there a way to know how many

Re: [sqlite] Sqlite-3.5.9: getting sqlite_autoindex error

2009-06-17 Thread hiral
Any suggestion on this !!! On Tue, Jun 16, 2009 at 4:34 PM, h o hiralsmaill...@gmail.com wrote: Hi, I am using sqlite-3.5.9 and observing a 'disk image malformed' error nfs, on doing 'PRAGMA integrity_check' I got following messages... SQLite version 3.5.9 Enter .help for instructions

Re: [sqlite] Database inserts gradually slowing down

2009-06-17 Thread Jens Páll Hafsteinsson
Here's the code I'm using to run the test (it includes the schema). I've been running this code for the last few days and am a bit baffled about my recent results, since I'm not seeing the gradual slowing anymore. This happened after I changed to use version 3.6.15 of sqlite and even if I

Re: [sqlite] Question about searches

2009-06-17 Thread Olaf Schmidt
Christophe Leske i...@multimedial.de schrieb im Newsbeitrag news:4a37b811.4030...@multimedial.de... You write your own comparison function that would consider these two strings equal. See sqlite3_create_function, sqlite3_create_collation. this problem pertains not only to Zürich, but to

[sqlite] Is the omit_readlock pragma still working?

2009-06-17 Thread Joerg Hoinkis
Hi! I'm trying to access a readonly database without locks, using the amalgamation of SQLite 3.6.14.2 After I opened the database with flags = SQLITE_OPEN_READONLY I perform sqlite3_exec (db, PRAGMA omit_readlock=ON, 0, 0, 0); I traced that down into the amalgamation to the point where the

Re: [sqlite] Is the omit_readlock pragma still working?

2009-06-17 Thread Joerg Hoinkis
Hi! I'm trying to access a readonly database without locks, using the amalgamation of SQLite 3.6.14.2 After I opened the database with flags = SQLITE_OPEN_READONLY I perform sqlite3_exec (db, PRAGMA omit_readlock=ON, 0, 0, 0); I traced that down into the amalgamation to the point

Re: [sqlite] SQLite (SQ3) Interfacing with SQL Server 2005 Standard Edition.

2009-06-17 Thread Roosevelt Anderson
I made a simple command line app that exports a MSSQL query to a sqlite table. This might not be exactly what you need but it should be in the ballpark. The app and the source can be found here: http://www.proghack.net/?p=40 On Wed, Jun 17, 2009 at 5:25 AM, David Cawley

Re: [sqlite] Sqlite-3.5.9: getting sqlite_autoindex error

2009-06-17 Thread Simon Davies
2009/6/17 hiral hiralsmaill...@gmail.com: Any suggestion on this !!! Your database has been corrupted. http://www.sqlite.org/lockingv3.html#how_to_corrupt Rgds, Simon On Tue, Jun 16, 2009 at 4:34 PM, h o hiralsmaill...@gmail.com wrote: Hi, I am using sqlite-3.5.9 and observing a 'disk

Re: [sqlite] NULL data .dump command

2009-06-17 Thread Joanne Pham
Hi All, Any hints! I have no problem with executing the followng sql : select * from signature but if I run this : select * from sig order by peerid; then I got the error message:     SQL error: database disk image is malformed I have index on peerid and I don't know why the second select has

Re: [sqlite] Sqlite-3.5.9: getting sqlite_autoindex error

2009-06-17 Thread hiral
Hi Simon, I looked into it but couldn't find the exact reason for my bug. If you have any idea please let me know. Also I would appreciate, if you can let me know what does this error mean in terms of btree/pager module of sqlite sqlite PRAGMA integrity_check; *** in database main ***

Re: [sqlite] minimum cache_size for a database connection?

2009-06-17 Thread Dave Toll
What is the correct way to specify that SQLite should perform no caching (or at least minimal caching)? PRAGMA cache_size=0 seems to have no effect - either it continues to use the default, or tries to caches everything. Cheers, Dave. -Original Message- From: D. Richard Hipp

Re: [sqlite] sqlite Exception System.InvalidCastException: Specified cast is not valid.

2009-06-17 Thread Robert Simpson
The best place to get answers to .NET-related issues with the System.Data.SQLite provider is: http://sqlite.phxsoftware.com I've got plenty of forums over there so we don't clutter up the list with wrapper issues unrelated to the engine itself. Robert Simpson -Original Message- From:

Re: [sqlite] [noob] merge statement equivalent?

2009-06-17 Thread James Gregurich
Dennis, question on an old post of yours below... on that update statement, is the SQL optimizer smart enough to not rerun that select statement for each column in the update's set clause? Is it going to run a single select statement to get value1, value2, etc. or is it going to run one

Re: [sqlite] [noob] merge statement equivalent?

2009-06-17 Thread James Gregurich
So what are you going to do? we need to get your plans pinned down. On Jun 17, 2009, at 11:46 AM, James Gregurich wrote: Dennis, question on an old post of yours below... on that update statement, is the SQL optimizer smart enough to not rerun that select statement for each column in

Re: [sqlite] [noob] merge statement equivalent?

2009-06-17 Thread James Gregurich
oops. sorry for errant message, folks. I had the wrong email selected when I hit the button and didn't pay attention to what I was doing. On Jun 17, 2009, at 3:19 PM, James Gregurich wrote: So what are you going to do? we need to get your plans pinned down. On Jun 17, 2009, at 11:46 AM,

Re: [sqlite] minimum cache_size for a database connection?

2009-06-17 Thread Dave Toll
Both PRAGMA cache_size=10 and PRAGMA cache_size=1 result in minimal caching, which is great. What is the expected behaviour of PRAGMA cache_size=0 for the default page cache? I'd like to know whether setting cache_size=0 has some special significance, maybe it's a case I need to prevent. Many

[sqlite] Asynchronous I/O Module For SQLite

2009-06-17 Thread Rizzuto, Raymond
I am interested in using sqlite3 for an application where I don't have a requirement that data persists after the using process ends. The db is used as a backing store for infrequently used records. Performance requirements are ~1500 transactions per second. I would like to use the asynch

Re: [sqlite] Asynchronous I/O Module For SQLite

2009-06-17 Thread D. Richard Hipp
On Jun 17, 2009, at 7:18 PM, Rizzuto, Raymond wrote: I am interested in using sqlite3 for an application where I don't have a requirement that data persists after the using process ends. The db is used as a backing store for infrequently used records. So use an in-memory database. Open

[sqlite] why is the data file locked after after using transaction?

2009-06-17 Thread liubin liu
why is the data file locked after after using transaction? the last result of printf() is: # IN END, ret = 5 It means to the database file is locked? why does it happen after using transaction although using sqlite3_finalize()? PS: if shielding the codes relating with the transaction, all the

Re: [sqlite] why is the data file locked after after using transaction?

2009-06-17 Thread Igor Tandetnik
liubin liu wrote: why is the data file locked after after using transaction? the last result of printf() is: # IN END, ret = 5 It means to the database file is locked? why does it happen after using transaction although using sqlite3_finalize()? You call sqlite3_prepare_v2 n+2 times, but

Re: [sqlite] why is the data file locked after after using transaction?

2009-06-17 Thread liubin liu
You are right I have mend the fault, ^_^ Thank You a lot! Igor Tandetnik wrote: liubin liu wrote: why is the data file locked after after using transaction? the last result of printf() is: # IN END, ret = 5 It means to the database file is locked? why does it happen after using