[sqlite] Andl: choices for generic types: bool, binary, number/decimal, date/datetime, text/varchar

2016-02-09 Thread da...@andl.org
Thanks for the response. It helps. > 1. Type name (string) to use in CREATE TABLE. > 2. Affinity. > 3. Datatype that will be returned by C API calls 4. Which C API call > to use to get and put data values. > > My current choices are: > Bool: TINYINT, INTEGER, value_int >>>Why not "BOOLEAN"?

[sqlite] A question about sqlite3_get_auxdata()/sqlite3_set_auxdata().

2016-02-09 Thread Peter Aronson
I had written code that I thought should cache the repeated user function arguments used in a SQL statement generally like so: SELECT a.id FROM a,b WHERE MyFunc(a.data,b.data); But to my surprise, even though I was saving my (parsed and processed) arguments using at the end of my function

[sqlite] SQLite crashing

2016-02-09 Thread Igor Korot
Hi, again, I did recompile everything with /MDd and I did fix couple of issues. However the crash is back and below is the (full) stack trace: () >sqlite.dll!sqlite3_mutex_enter(sqlite3_mutex * p) Line 19996 + 0xc bytes > C sqlite.dll!sqlite3Close(sqlite3 * db, int

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Domingo Alvarez Duarte
Thank you again for the answer ! Now I understand the problem, maybe fossil could give an extra bit of info when it's invoked like "fossil update" maybe something like: You are now at "branch_name" and it's behind "trunk" by X commits. ? > Tue Feb 09 2016 6:46:13 pm CET CET from

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Stephan Beal
On Tue, Feb 9, 2016 at 6:16 PM, Domingo Alvarez Duarte < sqlite-mail at dev.dadbiz.es> wrote: > Thanks for the answer ! > > Although it seems a bit weird this behavior of get stuck on one specific > branch. > You might have done 'update tip' at some point when that was the newest. -- -

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Domingo Alvarez Duarte
Thanks for the answer ! Although it seems a bit weird this behavior of get stuck on one specific branch. Cheers ! > OTOH, if that tag is checked out, which your output indicates is the case, > > >>then 'update' will apply no changes because that's the last commit in that >> branch.

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Domingo Alvarez Duarte
? > OTOH, if that tag is checked out, which your output indicates is the case, > then 'update' will apply no changes because that's the last commit in that > branch. You'll need to 'fossil update trunk' once to get back to the trunk. > > Thanks "fossil update trunk" solved the problem !

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Domingo Alvarez Duarte
Can you try doing this one from the sqlite tree: > > fossil pull --verily > > in the past that's helped people reporting problems about a repo silently > failing to pull past a certain version. > > ? fossil pull --verilyPull from http://www.sqlite.org/src Round-trips: 2?? Artifacts

[sqlite] Turkish character problem

2016-02-09 Thread R Smith
On 2016/02/09 5:57 PM, Salih Y?cel wrote: > Hi, > I have windowns phone project but one problem . Sqli te select result data > type text column turkish characters encoding problem > But Android operation system no problem turkish characters > > > Salih Y?cel > Mobil Grup Lideri /Mobile Group

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread R Smith
That's not an SQLitespeed feature but indeed a backwards-compatible SQLite feature. (I had this wrong too at some point) You probably already know, but to be clear: In SQL standard, double-quotes indicate identifiers and single quotes indicate string values. While the single quotes are used

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Stephan Beal
On Tue, Feb 9, 2016 at 5:38 PM, Stephan Beal wrote: > fossil pull --verily > > in the past that's helped people reporting problems about a repo silently > failing to pull past a certain version. > OTOH, if that tag is checked out, which your output indicates is the case, then 'update' will

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Stephan Beal
On Tue, Feb 9, 2016 at 5:20 PM, Domingo Alvarez Duarte < sqlite-mail at dev.dadbiz.es> wrote: > I frequently follow the updates of fossil and sqlite but I noticed that my > sqlite clone stop updating the source tree at this commit : > Can you try doing this one from the sqlite tree: fossil pull

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Domingo Alvarez Duarte
Hello ! I frequently follow the updates of fossil and sqlite but I noticed that my sqlite clone stop updating the source tree at this commit : fossil status repository:?? /sqlite3/../sqlite.fossil local-root:?? /sqlite3/ config-db:?? /.fossil checkout:

[sqlite] A question about sqlite3_get_auxdata()/sqlite3_set_auxdata().

2016-02-09 Thread Richard Hipp
On 2/9/16, Peter Aronson wrote: > So, why *isn't* metadata preserved between function calls for data values? Because the database value will likely change, rendering the metadata obsolete. The metadata is only preserved when the value is a constant. That mechanism is intended for operators

[sqlite] How to enter Unicode character?

2016-02-09 Thread Igor Korot
Hi, On Tue, Feb 9, 2016 at 3:09 AM, Dominique Devienne wrote: > On Mon, Feb 8, 2016 at 6:26 PM, Dominique Devienne > wrote: > >> OK, I retried with latest sqlite3.exe, and the results are different: >> >> C:\Users\DDevienne>sqlite3 >> SQLite version 3.10.2 2016-01-20 15:27:19 >> Enter ".help"

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
Yes. Nothing complicated, fortunately. On Tue, Feb 9, 2016 at 4:09 PM, Steven M. McNeese < steven.mcneese at freedomparkdfw.com> wrote: > So are you saying you are just reading data from your SQLite db using C# > and > just need to insert using the SQLite command? > > -Original Message-

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Thanks for the detailed explanation. Regards, Chris On Tue, Feb 9, 2016 at 4:05 PM, R Smith wrote: > That's not an SQLitespeed feature but indeed a backwards-compatible SQLite > feature. (I had this wrong too at some point) > > You probably already know, but to be clear: In SQL standard,

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Salih YĆ¼cel
Hi, I have windowns phone project but one problem . Sqli te select result data type text column turkish characters encoding problem But Android operation system no problem turkish characters Salih Y?cel Mobil Grup Lideri /Mobile Group Leader Univera Bilgisayar Sistemleri San. ve Tic. A.?.

[sqlite] Andl: choices for generic types: bool, binary, number/decimal, date/datetime, text/varchar

2016-02-09 Thread Clemens Ladisch
david at andl.org wrote: >> If you do not know what type is _actually_ stored, call >> sqlite3_column_type() first. > > That looks like one call to get the type, a choice of 3 calls for INTEGER, > REAL or TEXT and a choice of 3 conversion/casts to get it to the final type If you want to get out a

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Clemens Ladisch
Chris Prakoso wrote: > insert into test (field1,field2) values (1,"two"),(2,"three") > > SQL Error: near ",": syntax error You might want to update to a tool that is not years out of date. Regards, Clemens

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Ok. Thanks for the reminder. Regards, Chris On Tue, Feb 9, 2016 at 3:18 PM, Richard Hipp wrote: > On 2/9/16, Chris Prakoso wrote: > > Actually I've just done it now, in SQLiteSpeed, and it allowed me to use > > double-quote as delimiter successfully. > > > > That is supported for backwards

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Actually I've just done it now, in SQLiteSpeed, and it allowed me to use double-quote as delimiter successfully. Regards, Chris On Tue, Feb 9, 2016 at 3:03 PM, Simon Slavin wrote: > > On 9 Feb 2016, at 12:10pm, Chris Prakoso wrote: > > > *insert into test (field1,field2) values

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Yes thank you. My SQLite is the latest, it's the front-end that is outdated, which I have just swiftly corrected. Regards, Chris On Tue, Feb 9, 2016 at 2:52 PM, Richard Hipp wrote: > On 2/9/16, Clemens Ladisch wrote: > > Chris Prakoso wrote: > >> insert into test (field1,field2) values

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Simon Slavin
On 9 Feb 2016, at 12:10pm, Chris Prakoso wrote: > *insert into test (field1,field2) values (1,"two"),(2,"three")* As well as the comments about your software being out of date, you need to know that the text delimiter in SQLite is the non-directional single quote character normally seen as

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread R Smith
On 2016/02/09 1:30 PM, Chris Prakoso wrote: > Hi Clemens, > > Thanks for your reply. I've tried to use raw SQL but it didn't work > either. Do you have any SQLite front-end that you use? If I may suggest, try SQLitespeed (http://sqlc.rifin.co.za/) and add your DB file, open it and then use

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
Steven, I don't use any back-end, the code I pasted here IS my back-end. I opted for direct SQLite connection. So I don't use EF6 nor Linq. Chris On Tue, Feb 9, 2016 at 1:47 PM, Steven M. McNeese < steven.mcneese at freedomparkdfw.com> wrote: > Chris, > > What are you using in c# for SQLite

[sqlite] All threads are frozen during the timeout if SQLITE is busy

2016-02-09 Thread olivier vidal
Good ideas! thank you Mr Hipp! > Richard Hipp > mardi 9 f?vrier 2016 13:00 > > The interface that governs the timeout is "sqlite3_busy_handler()". > Perhaps you can modify its callback to yield to another thread, rather > than simply sleeping. Or just set the timeout

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Thanks Ryan, I will definitely try it. I'm ok with raw SQL, just not familiar with the odd ones like this multiple rows update. Thanks a lot, Chris On Tue, Feb 9, 2016 at 12:42 PM, R Smith wrote: > > > On 2016/02/09 1:30 PM, Chris Prakoso wrote: > >> Hi Clemens, >> >> Thanks for your reply.

[sqlite] Andl: choices for generic types: bool, binary, number/decimal, date/datetime, text/varchar

2016-02-09 Thread da...@andl.org
Hi Darren Yes, I get that, but the idea is that as far as possible the underlying database retains native values and types, so that (a) SQL queries work as expected (b) non-Andl programs can access the data. I could simply encode everything as my own private bit strings, but making maximum use of

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Clemens Ladisch
Chris Prakoso wrote: > public bool UpdateData(string tableName, Dictionary > fields, List whereKeys) > { > ... > using (SQLiteTransaction transaction = > conn.BeginTransaction()) > { > ...

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Richard Hipp
On 2/9/16, Domingo Alvarez Duarte wrote: > Thanks for the answer ! > > Although it seems a bit weird this behavior of get stuck on one specific > branch. The check-in you were stuck on was originally on trunk. But when an error was discovered in that check-in, it was diverted to a branch. You

[sqlite] NOP INSERT still writes to the DB/journal

2016-02-09 Thread Patrick Donnelly
Hello, On Mon, Dec 7, 2015 at 5:05 PM, Patrick Donnelly wrote: > Update on this: > > On Mon, May 5, 2014 at 4:53 PM, Patrick Donnelly > wrote: >> Hi, >> >> I have an INSERT that looks like >> >> INSERT INTO T >> SELECT ... >> >> which I'm running numerous times a second that generally

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
Ok. Got it. Now, if only I can get that multiple rows update working on my code, it would be perfect. Thanks a lot, Chris On Tue, Feb 9, 2016 at 12:07 PM, Clemens Ladisch wrote: > Chris Prakoso wrote: > > public bool UpdateData(string tableName, > Dictionary fields, List

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Richard Hipp
On 2/9/16, Domingo Alvarez Duarte wrote: > > fossil pull --verilyPull from http://www.sqlite.org/src > Round-trips: 2 Artifacts sent: 0 received: 28 > Pull done, sent: 1090 received: 1579893 ip: 67.18.92.124 > > After the above I also executed the command bellow and the respository still >

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Clemens Ladisch
Chris Prakoso wrote: > I've been testing the performance of my Insert/Update using > Transaction and without, and I found that it is quicker when I don't > use it. Show the code. Regards, Clemens

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Clemens Ladisch
Chris Prakoso wrote: > My question is whether anybody had successfully implemented multiple > rows Insert/Update. This is possible in SQL: INSERT INTO MyTable(ID, Value) VALUES (1, 'hello'), (2, 'world'); UPDATE MyTable SET Value = 'the same value' WHERE ID IN (1, 2); -- rather verbose;

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
I did a test using simple table, and entering the sql directly using SQLite Administrator: *insert into test (field1,field2) values (1,"two"),(2,"three")* The error I got from the SQLite Administrator is: *2/9/2016 11:29:40 AM: SQL Error: near ",": syntax error * Thanks, Chris On Tue, Feb

[sqlite] Andl: choices for generic types: bool, binary, number/decimal, date/datetime, text/varchar

2016-02-09 Thread da...@andl.org
Having read and understood the documentation on Sqlite data types, I'm really just looking for a single recommendation on which choices to make. I need to store generic data in 5 types: bool, binary, number/decimal, text/nvarchar, time/date/datetime. Decimal has more than 15 digits of

[sqlite] Fossil sqlite clone problem

2016-02-09 Thread Richard Hipp
On 2/9/16, Stephan Beal wrote: > On Tue, Feb 9, 2016 at 5:38 PM, Stephan Beal wrote: > >> fossil pull --verily >> >> in the past that's helped people reporting problems about a repo silently >> failing to pull past a certain version. >> > > OTOH, if that tag is checked out, which your output

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
Here they are: public bool UpdateData(string tableName, Dictionary fields, List whereKeys) { bool result = false; string sql = ""; List fieldList = new List(); List whereKeyList = new List(); int

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Hi Clemens, Thanks for your reply. I've tried to use raw SQL but it didn't work either. Do you have any SQLite front-end that you use? Regards, Chris On Tue, Feb 9, 2016 at 11:12 AM, Clemens Ladisch wrote: > Chris Prakoso wrote: >> My question is whether anybody had successfully implemented

[sqlite] Andl: choices for generic types: bool, binary, number/decimal, date/datetime, text/varchar

2016-02-09 Thread Clemens Ladisch
david at andl.org wrote: > 1. Type name (string) to use in CREATE TABLE. > 2. Affinity. > 3. Datatype that will be returned by C API calls > 4. Which C API call to use to get and put data values. > > My current choices are: > Bool: TINYINT, INTEGER, value_int Why not "BOOLEAN"? (This would

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Chris Prakoso
Hi all, I've been testing the performance of my Insert/Update using Transaction and without, and I found that it is quicker when I don't use it. Anybody has an insight on this? Thanks a lot, Chris

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Chris Prakoso
Hi all, I just joined the Mailing List yesterday, so apologise for any mistake I am doing. I'm a .NET (C#) Developer, and at the moment I'm coding a small app with SQLite as the backend database. My question is whether anybody had successfully implemented multiple rows Insert/Update. I've

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Richard Hipp
On 2/9/16, Chris Prakoso wrote: > Actually I've just done it now, in SQLiteSpeed, and it allowed me to use > double-quote as delimiter successfully. > That is supported for backwards compatibility. I originally put in support for double-quoted string literals to be compatible with MySQL 3.5. I

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Steven M. McNeese
So are you saying you are just reading data from your SQLite db using C# and just need to insert using the SQLite command? -Original Message- From: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Chris Prakoso Sent:

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Richard Hipp
On 2/9/16, Clemens Ladisch wrote: > Chris Prakoso wrote: >> insert into test (field1,field2) values (1,"two"),(2,"three") >> >> SQL Error: near ",": syntax error > > You might want to update to a tool that is not years out of date. > What Clemens means by this is that prior to SQLite 3.7.11

[sqlite] All threads are frozen during the timeout if SQLITE is busy

2016-02-09 Thread olivier vidal
Hello, I use SQLITE with Xojo (formerly Realbasic), a kind of VB multiplatform. Xojo embeds a SQLITE 3.9.2 database. It works well. But I have a concern, and I do not know if it is a Xojo problem, or a SQLITE problem. I am creating an application with Xojo/Sqlite. This application launches

[sqlite] All threads are frozen during the timeout if SQLITE is busy

2016-02-09 Thread olivier vidal
Hello, I use SQLITE with Xojo (formerly Realbasic), a kind of VB multiplatform. Xojo embeds a SQLITE 3.9.2 database. It works well. But I have a concern, and I do not know if it is a Xojo problem, or a SQLITE problem. I am creating an application with Xojo/Sqlite. This application launches

[sqlite] How to enter Unicode character?

2016-02-09 Thread Dominique Devienne
On Mon, Feb 8, 2016 at 6:26 PM, Dominique Devienne wrote: > OK, I retried with latest sqlite3.exe, and the results are different: > > C:\Users\DDevienne>sqlite3 > SQLite version 3.10.2 2016-01-20 15:27:19 > Enter ".help" for usage hints. > Connected to a transient in-memory database. > Use

[sqlite] Andl: choices for generic types: bool, binary, number/decimal, date/datetime, text/varchar

2016-02-09 Thread Richard Hipp
On 2/9/16, Scott Robison wrote: > On Feb 9, 2016 3:16 AM, "Clemens Ladisch" wrote: >> > all text values are UTF-8 by default? >> >> Yes. It would be possible to configure databases to store text values >> as UTF-16, but nobody does this, and they would be converted >> automatically when using

[sqlite] C# + SQLite - Update/Insert using Transaction is slower than without.

2016-02-09 Thread Steven M. McNeese
Chris, What are you using in c# for SQLite back end? Ado.net? Linq. Let me know and I can help you with bulk inserts. Sent from my iPhone > On Feb 9, 2016, at 6:13 AM, Chris Prakoso wrote: > > Ok. Got it. > Now, if only I can get that multiple rows update working on my code, it > would be

[sqlite] All threads are frozen during the timeout if SQLITE is busy

2016-02-09 Thread Richard Hipp
On 2/9/16, olivier vidal wrote: > > - One thread writes > - While this thread wrote, another thread requests to write. Of course, > a "busy" error is generated, this is normal. But until the error is > generated, all threads in the application are frozen during the sqlite > timeout! > > I tried

[sqlite] C# + SQLite - How do you do Multiple Rows Inserts/Updates?

2016-02-09 Thread Richard Hipp
On 2/9/16, Chris Prakoso wrote: > Hi Clemens, > > Thanks for your reply. I've tried to use raw SQL but it didn't work > either. Please show us the SQL that you did you. > Do you have any SQLite front-end that you use? > The only supported "front-end" (if I correctly understand your meaning)

[sqlite] Andl: choices for generic types: bool, binary, number/decimal, date/datetime, text/varchar

2016-02-09 Thread Scott Robison
On Feb 9, 2016 3:16 AM, "Clemens Ladisch" wrote: > > all text values are UTF-8 by default? > > Yes. It would be possible to configure databases to store text values > as UTF-16, but nobody does this, and they would be converted > automatically when using sqlite3_column_text(). Certainly one