[sqlite] SQLITE_CORRUPT error

2010-05-10 Thread daksh jasra
Hey Guy's, I have ported SQLITE over VRTX based embedded platform, now after using for a 1 year suddenly started getting SQLITE_CORRUPT ERORR, used queue and mutex at application level to make sqilte DB access thread safe as sqlite library itself is compiled without thread safe options, Strange

[sqlite] .import csv with no error

2010-05-10 Thread Bigane
Hi Everyone, I have patched my SQLite3.exe source (shell.c) to have an ".import" function witch can read ".mod csv" exports : - can read QUOTE + TEXT + CRLF + TEXT + QUOTE - can read QUOTE + SEPARATOR + QUOTE - can read QUOTE + TEXT + SEPARATOR + TEXT + QUOTE - can read QUOTE + TEXT + 2QUOTES

[sqlite] Select via Wi-fi very slow

2010-05-10 Thread Ernany
Hello, I'll try to explain my problem: I have a Symbol MC3090 Data Collector with VB.Net 2005. I have a database with 80,000 records on the computer. For example: I search all words that begin with "shirt" and show in the Grid Collector. Sometimes search found 200 records. When I do a query via

Re: [sqlite] Update: set multiple values

2010-05-10 Thread Simon Slavin
On 10 May 2010, at 9:25pm, Adam DeVita wrote: > Simon, can you expand your syntax, or are you just saying, "get x,y,z store > them in a set of variables, then run update with appropriate bindings"? Just that. You have a programming language with variables, so use it. That's what your program

Re: [sqlite] Update: set multiple values

2010-05-10 Thread Adam DeVita
Simon, can you expand your syntax, or are you just saying, "get x,y,z store them in a set of variables, then run update with appropriate bindings"? Hopefully this related question isn't called hijacking a thread. I feel this belongs together under set multiple values using the update query. I'm

Re: [sqlite] Foreign constraints and table recreation

2010-05-10 Thread Patrick Earl
On Mon, May 10, 2010 at 10:58 AM, Simon Slavin wrote: > > It should not be possible to have circular dependencies.  Because you somehow > got the data in in the first place, and /that/ wouldn't have been possible > had you had circular dependencies.  Part of normalising your data structure > in

Re: [sqlite] Should this work?

2010-05-10 Thread Matt Young
Reading your response, thinks. I did however find that the incoming data did not conform to what I expects (contiguous series_id), so the code worked, my thinking did not. On 5/10/10, Tim Romano wrote: > The select/group by part of your statement will group table SERIESDATA by > text-column serie

Re: [sqlite] Foreign constraints and table recreation

2010-05-10 Thread Simon Slavin
On 10 May 2010, at 5:32pm, Patrick Earl wrote: > 1. Find all direct and indirect dependants of the table being modified. > 2. Create temporary tables for all of these. > 3. Copy the data from the main tables into these temporary tables. > 3a. If no circular dependencies, do a topological sort

Re: [sqlite] Foreign constraints and table recreation

2010-05-10 Thread Patrick Earl
Thanks Simon. I believe you're correct in that I can recreate all dependant tables. I had attempted this trick earlier, but was doing so in the context of immediate mode constraints, and that made the re-insertion of data and dropping of tables exceptionally complicated in some cases (such as cir

Re: [sqlite] SQLite Database in Shared Memory

2010-05-10 Thread Simon Slavin
On 10 May 2010, at 4:47pm, Alexey Pechnikov wrote: > TCP-socket listening daemon + SQLite in-memory database may be helpful. Yes. You can make one process, which handles all your SQLite transactions, and receives its orders from other processes via inter-process calls or TCP/IP. I've seen a

Re: [sqlite] SQLite Database in Shared Memory

2010-05-10 Thread Jay A. Kreibich
On Mon, May 10, 2010 at 11:15:59AM -0400, Pavel Ivanov scratched on the wall: > > Any ideas about how to implement a DB in shared memory? > > It's impossible with current SQLite code base. Even if you try to > implement your own database cache and will allocate it in some shared > memory it won't

Re: [sqlite] SQLite Database in Shared Memory

2010-05-10 Thread Alexey Pechnikov
TCP-socket listening daemon + SQLite in-memory database may be helpful. -- Best regards, Alexey Pechnikov. http://pechnikov.tel/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite Database in Shared Memory

2010-05-10 Thread Pavel Ivanov
> Any ideas about how to implement a DB in shared memory? It's impossible with current SQLite code base. Even if you try to implement your own database cache and will allocate it in some shared memory it won't work because along with cache pages SQLite also stores some internal information which s

Re: [sqlite] Select question

2010-05-10 Thread Simon Slavin
On 10 May 2010, at 12:20pm, Simon Slavin wrote: > Sort in descending order of rank, and add LIMIT 10 to the end of your SELECT > statement. Depending on your names, it'll look something like > > SELECT * FROM dailyRankingTable ORDER BY rank DESC LIMIT 10 Hahaha. Wrong way up. That should be

Re: [sqlite] Should this work?

2010-05-10 Thread Tim Romano
The select/group by part of your statement will group table SERIESDATA by text-column series_id (aliased to id) and return the min and max data_index for each grouping, assuming those columns are populated with data for each row. The set will have three columns and some number of rows, one per id.

Re: [sqlite] Select question

2010-05-10 Thread Simon Slavin
On 10 May 2010, at 10:50am, Andreas Henningsson wrote: > select top 10 * from dailyRankingTable > > union all > > SELECT a.* FROM dailyRankingTable a, friendTable b WHERE upper(b.player) > = upper('?') AND upper(b.friend) = upper(a.name) > > Top 10 does not work for SQlite I believe. But you m

Re: [sqlite] Foreign constraints and table recreation

2010-05-10 Thread Simon Slavin
On 10 May 2010, at 7:34am, Patrick Earl wrote: >PRAGMA foreign_keys = ON; > >CREATE TABLE ParkingLot (Id int NOT NULL PRIMARY KEY); >CREATE TABLE Car (Id int NOT NULL PRIMARY KEY, ParkingLotId int > NOT NULL REFERENCES ParkingLot (Id) DEFERRABLE INITIALLY DEFERRED); >INSERT INTO

[sqlite] SQLite Database in Shared Memory

2010-05-10 Thread Manuj Bhatia
Hi, I am trying to implement a shared queue (to asynchronously exchange messages between processes) using SQLite. Since I do not need my queues to be persistent (at least for now), I do not want to use disk based SQLite database (for better performance). I see there is an option to create purely

Re: [sqlite] Select question

2010-05-10 Thread Andreas Henningsson
select top 10 * from dailyRankingTable union all SELECT a.* FROM dailyRankingTable a, friendTable b WHERE upper(b.player) = upper('?') AND upper(b.friend) = upper(a.name) Top 10 does not work for SQlite I believe. But you might can find something like it. /Andreas On Mon, May 10, 2010 at 11:18

[sqlite] Select question

2010-05-10 Thread Ian Hardingham
Hey guys. I have the following query: SELECT a.* FROM dailyRankingTable a, friendTable b WHERE upper(b.player) = upper('?') AND upper(b.friend) = upper(a.name) (ignore the uppers for now - I'm going to refactor soon) I would like this query to also select the first 10 elements of dailyRanking