Re: [sqlite] Contrib: extensions.-

2011-09-12 Thread Kevin Benson
On Mon, Sep 12, 2011 at 12:50 AM, Freddy López wrote: > Hello. > > I have been having problems with page www.sqlite.org/contrib and I need > file > extension-functions.c (50.96 KB) contributed by Liam Healy... There exist > some alternative place where can I download it?

Re: [sqlite] help to get the value of file change counter

2011-09-12 Thread Simon Slavin
On 12 Sep 2011, at 5:08am, Akash Agrawal wrote: > I'd like to be able to tell whether a SQLite database file has been updated > in any way. How would I go about implementing that? > > I find about some file change counter but how i will get the value of file > change counter through C program

Re: [sqlite] help to get the value of file change counter

2011-09-12 Thread Akash Agrawal
this is very helpful for me thank you -- Regards Akash Agrawal On Mon, Sep 12, 2011 at 12:39 PM, Simon Slavin wrote: > > On 12 Sep 2011, at 5:08am, Akash Agrawal wrote: > > > I'd like to be able to tell whether a SQLite database file has been > updated > > in any way.

[sqlite] splitting a line to produce several lines?

2011-09-12 Thread Jean-Denis MUYS
I am migrating data from a database which has a table that describes items by "kinds". Instances of those "kinds" are stored in one column of this table, listing each instance's id, with all ids separated by a slash "/". Of course, this is a very poor design. The target system has a proper

Re: [sqlite] TransactionScope ON CONFLICT (oops, missed a step)...

2011-09-12 Thread Joe Mistachkin
Oops, forgot to update to the bug-ccfa69fc32 branch, inserted new step #8 below to correct this. Steffen Mangold wrote: > > It would really help me if you send me your step by step instructions. > I had some experience with SVN, but it will help for building. > 1. Download the Fossil binary

Re: [sqlite] Multi-column unique constraint in SQLite

2011-09-12 Thread liviodl
Simon Slavin-3 wrote: > > > I agree with Jay. What's happening is this: > > New row assembled. > Attempt to INSERT new row (first attempt) > INSERT fails UNIQUE contraint. > Notes that it was an INSERT OR REPLACE, therefore ... > DELETE original row. > Attempt to INSERT new row

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Nice job! :) It works now like expected. I have tested it with use of this patch http://system.data.sqlite.org/index.html/info/42af4d17a5 . I also wrote a comment to the ticket [ccfa69fc32]. Thank you, great job. Steffen Joe Mistachkin wrote: >I believe that I've found and fixed an issue in the

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Sorry, I make my test with wrong conditions it looks like It not works correct at all. Please give me a sec to do some more tests and ignore my last message *shame*. I come back here after testing. Steffen Mangold wrote: >Nice job! :) It works now like expected. I have tested it with use of

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Ok im not clear if im doning it right. I follow your instructions and get a compliable version. But how to get your branch? What I'm doing now is to download the zip under "Other links: Zip archive" under http://system.data.sqlite.org/index.html/info/42af4d17a5 and copy it over the version from

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Ok I'm tested it now in a simple test environment. Conditions: 1 table with two columns "TimeStamp" (PK) and "SensorID" (simple value). First I add a row with "TimeStamp" "2011-01-01 01:05:00" (Success) Then I doing a Transaction with 10 "TimeStamps" from "2011-01-01 01:00:00" to "2011-01-01

Re: [sqlite] splitting a line to produce several lines?

2011-09-12 Thread Black, Michael (IS)
Since SQL is designed to return rows I believe the answer is "no" since you're data is not stored in rows. You need to do what's referred to as "normalizing" your data. If you normalize the answer becomes a natural query. create table kind (kind_id int primary key, name text); insert into kind

Re: [sqlite] help with a complicated join of two tables

2011-09-12 Thread Igor Tandetnik
Mr. Puneet Kishor wrote: >>> The table geo can also have rows with min_age = max_age. I want a result >>> set with geo.id, min_age, max_age, age_bottom, age_top, >>> name, color like so: >>> >>> - every row should be for one and only one geo record. I have 39K rows in >>>

Re: [sqlite] help to get the value of file change counter

2011-09-12 Thread Igor Tandetnik
Simon Slavin wrote: > > > int sqlite3_total_changes(sqlite3*); > > My understanding (which might be wrong) is that this count includes all > changes made by all connections to that database: not > only changes made using

[sqlite] sqlite in-memory mode - Is there any limit about the data size using in-memory mode?

2011-09-12 Thread 鲍少明
Hi there, I just have a question. If I am using JDBC driver to connect to sqlite using in-memory mode, is there any limit about the data size? Thanks. Clark ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Igor Tandetnik
Steffen Mangold wrote: > Ok I'm tested it now in a simple test environment. > > Conditions: > 1 table with two columns "TimeStamp" (PK) and "SensorID" (simple value). > > First I add a row with "TimeStamp" "2011-01-01 01:05:00" (Success) > Then I doing a Transaction

Re: [sqlite] splitting a line to produce several lines?

2011-09-12 Thread Jean-Denis MUYS
On 12 sept. 2011, at 13:26, Black, Michael (IS) wrote: Since SQL is designed to return rows I believe the answer is "no" since you're data is not stored in rows. I suspected such a limitation. Thanks for the confirmation. (though I question the justification: "SQL is designed to return rows"

Re: [sqlite] help to get the value of file change counter

2011-09-12 Thread Richard Hipp
On Mon, Sep 12, 2011 at 8:02 AM, Igor Tandetnik wrote: > Simon Slavin wrote: > > > > > > int sqlite3_total_changes(sqlite3*); > > > > My understanding (which might be wrong) is that this count includes

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
No i think i can exclude this as the problem. Because my code goes like this: using (dataDBEntities context = new dataDBEntities()) //create context { using (TransactionScope transaction = new TransactionScope()) //begin transaction {

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Igor Tandetnik
Steffen Mangold wrote: > No i think i can exclude this as the problem. > Because my code goes like this: > > try >{ > context.SaveChanges(); // save changes with transaction !exception raised here Inside this call, a loop runs, with one INSERT

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Joe Mistachkin
Steffen Mangold wrote: > > No i think i can exclude this as the problem. > Because my code goes like this: > The test case I added for this issue is remarkably similar to your code, except it uses a different schema (the Northwind sample database) and does not re-throw the exception in the catch

Re: [sqlite] Contrib: extensions.-

2011-09-12 Thread Freddy López
Thank you Kevin. :-) On Mon, Sep 12, 2011 at 02:19, Kevin Benson wrote: > On Mon, Sep 12, 2011 at 12:50 AM, Freddy López >wrote: > > > Hello. > > > > I have been having problems with page www.sqlite.org/contrib and I need > > file > >

Re: [sqlite] splitting a line to produce several lines?

2011-09-12 Thread Max Vlasov
On Mon, Sep 12, 2011 at 12:28 PM, Jean-Denis MUYS wrote: > > My question is: is there a pure SQL way to split the instances string, and > generate the instance lines from the instance list string? contrived example: > This kind of questions appear from time to time

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Hm... but the exception i get is an SQLite constraint exception. This means that The error occurs at the moment where SQLite provider try to write data to the DB. So I cannot have influence to this loop that you mean. Igor Tandetnik wrote: >Inside this call, a loop runs, with one INSERT

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Igor Tandetnik
Steffen Mangold wrote: > Hm... but the exception i get is an SQLite constraint exception. This means > that > The error occurs at the moment where SQLite provider try to write data to the > DB. Which is inside SaveChanges call. > So I cannot have influence to this

Re: [sqlite] help to get the value of file change counter

2011-09-12 Thread Simon Slavin
On 12 Sep 2011, at 1:35pm, Richard Hipp wrote: > On Mon, Sep 12, 2011 at 8:02 AM, Igor Tandetnik wrote: > >> Simon Slavin wrote: >>> >>> >>> int sqlite3_total_changes(sqlite3*); >>> >>> My

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Joe Mistachkin wrote: >The test case I added for this issue is remarkably similar to your code, >except it uses a different schema (the Northwind sample database) and does not >re-throw the exception in the catch block (it simply writes it to the console >instead). >The one >modification I

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Igor Tandetnik wrotes: >I'm not sure I understand this statement. What kind of "influence" do you want >to exert? To work like expected. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Joe Mistachkin
Steffen Mangold wrote: > > I try this now but with no success. > Are you sure the application is loading the new DLLs and not some stale DLLs leftover from before? > > Did it work at your test case? > Yes, my test case works properly (the first time). The second time, all the rows have

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Joe Mistachkin wrote: > > Are you sure the application is loading the new DLLs and not some stale DLLs > leftover from before? > Yes, i look with Visual Studio in the "Loading Modules" window. Path and version are correct (1.7.5) before I had installed only some 1.6 runtimes. Hopes I do all

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Joe Mistachkin
Steffen Mangold wrote: > > So you add all the 15 rows inside one transactionscope and with one > context.SaveChanges() call? > Yes. > > Perhaps it makes a difference if the contains violation is inside the > 15 rows you try to add (row 10 is incompatible with row 2 for example) > The important

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Steffen Mangold wrote: > > The important thing is that there is only one SaveChanges call (which > attempts to commit pending changes to the underlying database). > Yes, i do so. > > My test case does attempt to add rows that conflict with data already present > in the sample database. > Ok,

Re: [sqlite] splitting a line to produce several lines?

2011-09-12 Thread Black, Michael (IS)
My point is that this normalization works on ALL databases. Ergo my reference to "SQL" and not "SQLite". MySql for example has split support but it's still overkill to implement something like what you want.

Re: [sqlite] TransactionScope ON CONFLICT

2011-09-12 Thread Steffen Mangold
Last error i would see is i have made an error with the assembly creation. Is it possible for you joe, to send me your assemblies direct per email? So I can exclude this error. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] help with a complicated join of two tables

2011-09-12 Thread Mr . Puneet Kishor
On Sep 12, 2011, at 6:51 AM, Igor Tandetnik wrote: > Mr. Puneet Kishor wrote: The table geo can also have rows with min_age = max_age. I want a result set with geo.id, min_age, max_age, age_bottom, age_top, name, color like so: - every row should

Re: [sqlite] help with a complicated join of two tables

2011-09-12 Thread Igor Tandetnik
On 9/12/2011 12:02 PM, Mr. Puneet Kishor wrote: On Sep 12, 2011, at 6:51 AM, Igor Tandetnik wrote: Something like this: select geo.id, min_age, max_age, age_bottom, age_top, name, color from geo left join intervals i on i.id = ( select id from intervals where age_bottom>=

Re: [sqlite] sqlite in-memory mode - Is there any limit about the data size using in-memory mode?

2011-09-12 Thread Jay A. Kreibich
On Mon, Sep 12, 2011 at 12:29:56PM +0800, ?? scratched on the wall: > Hi there, > > I just have a question. If I am using JDBC driver to connect to sqlite using > in-memory mode, > is there any limit about the data size? PRAGMA max_page_count should work on in-memory databases.

Re: [sqlite] sqlite in-memory mode - Is there any limit about the data size using in-memory mode?

2011-09-12 Thread Stephan Beal
On Mon, Sep 12, 2011 at 6:47 PM, Jay A. Kreibich wrote: > On Mon, Sep 12, 2011 at 12:29:56PM +0800, ?? scratched on the wall: > > is there any limit about the data size? > > PRAGMA max_page_count should work on in-memory databases. > Isn't there also the limitation that

Re: [sqlite] sqlite in-memory mode - Is there any limit about the data size using in-memory mode?

2011-09-12 Thread Jay A. Kreibich
On Mon, Sep 12, 2011 at 06:56:50PM +0200, Stephan Beal scratched on the wall: > On Mon, Sep 12, 2011 at 6:47 PM, Jay A. Kreibich wrote: > > > On Mon, Sep 12, 2011 at 12:29:56PM +0800, ?? scratched on the wall: > > > is there any limit about the data size? > > > > PRAGMA

Re: [sqlite] Encoding and Collation

2011-09-12 Thread Jan Hudec
On Sun, Sep 11, 2011 at 11:55:23 -0300, Antonio Maniero wrote: > I doubt it that it would be ease to storing 8859 without string functions > problems. The proper collation would be simple, of course, but probably I > would need to re-implement all string functions too. Am I wrong? > > I can use