[sqlite] UTF support

2014-10-06 Thread J Decker
I saw a few things go by about unicode... and understand that it should just work to store the data as characters... I'm getting a unrecognized token... and think this page isn't right... I was playing with greek translation of 'mary had a little lamb' http://www.sqlite.org/tokenreq.html

Re: [sqlite] UTF support

2014-10-07 Thread J Decker
On Tue, Oct 7, 2014 at 5:02 AM, Richard Hipp <d...@sqlite.org> wrote: > On Tue, Oct 7, 2014 at 12:06 AM, J Decker <d3c...@gmail.com> wrote: > > > I saw a few things go by about unicode... and understand that it should > > just work to store the data as cha

Re: [sqlite] UTF support

2014-10-07 Thread J Decker
On Tue, Oct 7, 2014 at 5:39 AM, Richard Hipp <d...@sqlite.org> wrote: > On Tue, Oct 7, 2014 at 12:06 AM, J Decker <d3c...@gmail.com> wrote: > > > I saw a few things go by about unicode... and understand that it should > > just work to store the data as cha

Re: [sqlite] UTF support

2014-10-07 Thread J Decker
Did find sqlite3_prepare16_v2; this allows the replace to work without error; but the result from the select to read it back isn't the same as what I put in... Still trying to figure out the differences... going to implement WideCharToMultiByte as conversion too to see what differences are

Re: [sqlite] UTF support

2014-10-07 Thread J Decker
So, I guess it is technically not allowed to encode 11 bit unicode characters as 16. the greek characters are 0x3XX which is 10 bits... I checked what WideCharToMultiByte was doing and found it was using 11 bit encodings... fixed my encoder to use an appropriate size for what's required, added 11

Re: [sqlite] UTF support

2014-10-07 Thread J Decker
On Tue, Oct 7, 2014 at 2:20 PM, jose isaias cabrera <jic...@cinops.xerox.com > wrote: > > "J Decker" wrote... > > > So, I guess it is technically not allowed to encode 11 bit unicode >> characters as 16. >> the greek characters are 0x3XX which is 10 bi

Re: [sqlite] Stored Procedures

2014-10-09 Thread J Decker
they can be implemented through registered extensions..(well no probably not how you're thinking).. I have a few functions to mimic MySQL functions like now(), curdate() pretty simple learned you can sqlite3_create_module() which is a virtual recordset... but apparently can't add syntax

Re: [sqlite] Inmemory database in sqlite

2014-10-17 Thread J Decker
if it uses disk, it can be persistant. If it's in memory, it's only as reliable as the power to the computer. If it's in memory and cached to disk, it's really a disk database. Just because someone says 'we have a memory database, that's the primary and disk is secondary' it's still a disk

Re: [sqlite] Performing a SELECT on an enormous database...

2014-10-26 Thread J Decker
On Sun, Oct 26, 2014 at 10:32 AM, Clemens Ladisch wrote: > Charles Samuels wrote: > > On Saturday, October 25, 2014 05:31:35 AM Richard Hipp wrote: > >> However, when updating a row, SQLite rewrites the entire row. > > > > Does this still apply if the column was added due to

Re: [sqlite] Autoincrement with rollback

2014-11-11 Thread J Decker
delete it and commit it... rollback is 'undo' and if anything was differen't it wouldn't be a very good undo. assign the key yourself? on failure keep incrementing? if it's supposed to have been inserted and deleted... then rollback is not the correct solution. On Tue, Nov 11, 2014 at 2:04 AM,

Re: [sqlite] Verifying a file is valid SQLite3

2014-11-16 Thread J Decker
OOC I searched 'sqlite file format' and found... http://www.sqlite.org/fileformat.html testing the first string bytes will be enough... it's enough for png, etc... can validate thate page lengths vs the real length, which is what sqlite uses to determine 'CORRUPT' plus some... On Sun, Nov 16,

Re: [sqlite] [sqlite-dev] Implementing per-value custom types

2014-11-26 Thread J Decker
a type column to go with variant data would probably be best... how many columns do you have that are actually self-described type required? could just serialize it to a blob; include type, and the value... kinda hard to select for a value that way... at least if it's a parallel type the value

Re: [sqlite] SQL newbie, how to implement a delete correctly.

2014-12-30 Thread J Decker
On Tue, Dec 30, 2014 at 9:40 AM, Jonathan Leslie wrote: > PRAGMA foreign_key_list(table-name) > I don't know the table-name, how do I get a list of table names in the > database? > > select * from sqlite_master > > From: Simon Slavin > To:

[sqlite] Is this date supposed to be less than or more than the other?

2015-01-02 Thread J Decker
is this... 2015-01-02 20:47:18 (this is datetime( 'now', '-3600 second' ) received = 2015-01-02 13:46:23.818-0800 this is a DATETIME column recorded in the database recieved2 = 2015-01-02 15:46:20.000-0600 this is a DATETIME column recorded in the database 13- (-8) = 21 which is more than NOW

Re: [sqlite] Is this date supposed to be less than or more than the other?

2015-01-02 Thread J Decker
ns with supported strings would work with at least =, >= <=, <, >, != I'll add a user function or something instead I guess... On Fri, Jan 2, 2015 at 3:21 PM, Clemens Ladisch <clem...@ladisch.de> wrote: > J Decker wrote: > > is this... 2015-01-02 20:47:1

Re: [sqlite] Is this date supposed to be less than or more than the other?

2015-01-02 Thread J Decker
On Fri, Jan 2, 2015 at 4:29 PM, Simon Davies <simon.james.dav...@gmail.com> wrote: > On 3 January 2015 at 00:12, J Decker <d3c...@gmail.com> wrote: > > Okay... > > https://www.sqlite.org/lang_datefunc.html > > > > https://www.sqlite.org/datatype3.html

Re: [sqlite] Is this date supposed to be less than or more than the other?

2015-01-02 Thread J Decker
On Fri, Jan 2, 2015 at 4:44 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 3 Jan 2015, at 12:12am, J Decker <d3c...@gmail.com> wrote: > > > https://www.sqlite.org/datatype3.html /* lists DateTime as a distinct > type > > */ > > No it doesn't.

Re: [sqlite] Client/Server Best Practices

2015-01-02 Thread J Decker
On Fri, Jan 2, 2015 at 3:25 PM, James K. Lowden wrote: > On Thu, 25 Dec 2014 05:32:45 -0700 (MST) > Rick Kelly wrote: > > > All SELECT type requests are wrapped with BEGIN TRANSACTION/COMMIT > > That shouldn't be necessary and afaik isn't necessary.

Re: [sqlite] Is this date supposed to be less than or more than the other?

2015-01-03 Thread J Decker
On Sat, Jan 3, 2015 at 5:23 AM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 3 Jan 2015, at 1:12am, J Decker <d3c...@gmail.com> wrote: > > > On Fri, Jan 2, 2015 at 4:44 PM, Simon Slavin <slav...@bigfraud.org> > wrote: > > > >> On 3 Jan

Re: [sqlite] Should .dump preserve foreign_keys pragma?

2015-01-08 Thread J Decker
On Thu, Jan 8, 2015 at 9:05 AM, Niall O'Reilly wrote: > At Thu, 8 Jan 2015 13:46:37 +, > Simon Slavin wrote: > > > > > > On 8 Jan 2015, at 1:38pm, Niall O'Reilly wrote: > > > > > I'ld have expected the foreign_keys pragma setting to have been > >

Re: [sqlite] About database structure

2015-01-18 Thread J Decker
could wish someone would propose a truly deep database design question... everyone tells me I'm no DBA but anyway you have already created it and filled it, but the syntax is wrong On Sun, Jan 18, 2015 at 6:10 PM, YAN HONG YE wrote: > I don't know how to create this table:

Re: [sqlite] Multi-thread mode question

2015-02-08 Thread J Decker
it's better to use a connection per thread... the connection resource isn't very big... even if you wrap the sqlite3_ calls... you'll need to wrap the entire lifetime of the statment... if you do a execute and then start stepping and getting values while another thread starts another statement...

Re: [sqlite] Porting SQLite to another operating system (not supported out of the box)

2015-02-12 Thread J Decker
this contains a very basic vfs implementation; kinda uses internal file abstraction stuff so a lot can be stripped out and replaced with fopen/fread/etc... https://code.google.com/p/c-system-abstraction-component-gui/source/browse/src/sqlite/sqlite_interface.c maybe it's more cryptic than I

[sqlite] Is this a bug ? How to rename a table and all dependencies ?

2015-08-21 Thread J Decker
On Fri, Aug 21, 2015 at 10:04 AM, sqlite-mail wrote: > Then do you think this is a bug ? >> Fri Aug 21 2015 18:57:33 CEST from "Simon Slavin" >>Subject: Re: [sqlite] Is this a bug ? How to rename a table and all >>dependencies ? while it may be considered a nice thing; it's not common practice

[sqlite] order by not working in combination with random()

2015-08-26 Thread J Decker
On Tue, Aug 25, 2015 at 7:16 PM, Stephen Chrzanowski wrote: > Somewhat of a devils advocate here, but I'm not sure one can order based on > JUST data. Take the DATE function, for example. If, by your words, ORDER > BY should only act on the data, consider this kind of query: > > select

[sqlite] order by not working in combination with random()

2015-08-26 Thread J Decker
On Wed, Aug 26, 2015 at 2:47 AM, Graham Holden wrote: > And while "SELECT random() AS rr ORDER BY rr" is slightly contrived, the > example from J Decker: > contrived? cause I copied it from the original poster's first message? it was used in MySQL as a way to shuffle a deck o

[sqlite] Obscure peculiarity with 3.9.2

2015-12-09 Thread J Decker
Once upon a time, journals would delete when all statements were closed. I find now to get all journals to delete you must also close all connections(opens). Figure at some point someone decided it was more optimal to leave journals around instead of recreating them on every statement (which it

[sqlite] No Sqlite.dll for VS 2015 C# console application

2015-12-18 Thread J Decker
you'll need system.data.sqlite.dll not just sqlite3.dll. I prefer to use the static version so system.data.sqlite.dll contains the sqlite3.lib so it's standalone other than the runtime used. (I've sometimes had to copy msvc*d.dll (debug version) because I'm sometimes lazy and know that it has

[sqlite] Malloc getting segmentation fault in sqlite

2015-12-24 Thread J Decker
Yes when I free'd memory I shouldn't have and kept a reference to it in other places... or that after freeing I had modified memory. But not from sqlite itself. On Thu, Dec 24, 2015 at 2:02 AM, santosh dasimanth wrote: > Hi All, > I am working on Sqlite in multi threaded environment on ARM v7

[sqlite] sqlite vfs and wal mode

2015-02-22 Thread J Decker
So now that I have the added complexity of my own vfs in which to make a sqlite vfs... I'm having some issues. Hmm... One of the first things I do is 'pragma journal_mode=WAL' I return sqlite_ok; but the result has 0 columns, whereas my command line tool returns a column 'journal_mode' and a row

[sqlite] sqlite vfs and wal mode

2015-02-22 Thread J Decker
I see; the first part... " result of the pragma or the error message if the pragma fails" I missed the or part... or rather missed the part before the or. On Sun, Feb 22, 2015 at 8:13 PM, J Decker wrote: > So now that I have the added complexity of my own vfs in which to make a

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread J Decker
On Wed, Jul 15, 2015 at 2:14 AM, Alek Paunov wrote: > Hi Hayden, > > On 14.07.2015 03:43, Hayden Livingston wrote: > >> Is there a concept of a schema-less JSON SQLite DB? >> >> My reason is simple: versioning. We have lot of business metrics that >> get updated let's say once a month, and

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread J Decker
On Wed, Jul 15, 2015 at 10:03 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 07/15/2015 08:22 AM, Sergej Jure?ko wrote: > > What do you guys think? Is it stupid, could it be improved? > > I recommend looking at Mongodb and Postgres first to see how they do >

[sqlite] storing data across multiple tables

2015-07-17 Thread J Decker
Don't knwo if you want to see the results from all tables in one row (join) or results from all tables as multiple rows (union) I'd think that if the timestamps were similar, order by with UNION would give something like you need? A vague idea of the concept would help. On Fri, Jul 17, 2015 at

[sqlite] Doc page revision request

2015-07-21 Thread J Decker
On Tue, Jul 21, 2015 at 3:51 PM, Bernardo Sulzbach < mafagafogigante at gmail.com> wrote: > Just to add some to the list of silly filters and silly silliness: at > home I can access everything, my school blocks wikipedia. I am not > kidding. > and wikipedia blocks knowledge of bosnian pyramids

[sqlite] changed time zone

2015-07-23 Thread J Decker
select time( 'now', 'localtime' ) does to something to trigger reading tzres.dll (windows library for timezone stuff?), but does not change the time updated after a timezone change. but I have a function to mimic sqlite now() function which returns localtime... this function works and is based on

[sqlite] How to get length of all columns in a table

2015-06-01 Thread J Decker
you get the length in the result set? sqlite3_column_bytes( statement, idx ); On Mon, Jun 1, 2015 at 10:28 AM, Drago, William @ CSG - NARDA-MITEQ < William.Drago at l-3com.com> wrote: > > -Original Message- > > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite- > >

[sqlite] Best way to handle time slicing of SQL data.

2015-06-02 Thread J Decker
On Tue, Jun 2, 2015 at 4:34 AM, Richard Warburton < richard at skagerraksoftware.com> wrote: > Hi, > > I'm wanting to store data in a way such that I can choose a time in the > past and view records as they were at that dateTime. Therefore (in my > mind), all updates are really inserts with a

[sqlite] problem compiling std_call dll

2015-03-01 Thread J Decker
On Sun, Mar 1, 2015 at 9:22 PM, Keith Medcalf wrote: > >I do not know if this is the case, but typically Windows creates names > >like > >_sqlite3_db_filename at X (where X is a number) if a function is defined as > >stdcall. It doesn't *have* to do this, but that's the convention used by > >

[sqlite] db File Remains Open After Connection is Closed

2015-03-05 Thread J Decker
do you have any ... SqliteCommand's laying around that aren't finished? On Thu, Mar 5, 2015 at 12:34 PM, RNACS - Info wrote: > I have a program written in Visual Basic .NET. > > One of the functions of the program is to move all of the program's data, > including a SQLite database to a

[sqlite] sqlite vfs and wal mode

2015-03-08 Thread J Decker
I was trying to figure out what to do about this WAL journal_mode option... 1) my vfs does not (and cannot) have a shared memory interface... so those routines are NULL (so I would think WAL logic should prohibit flagging the database as wal...) 2) I tried to return error on the pragma, but

[sqlite] system.data.sqlite.dll and Widows 10

2015-03-18 Thread J Decker
It might also be the runtime; was trying to install a debug version at one point and msvcr110d.dll was missing... maybe it's just that the required runtime is missing yet? It also just threw an error 'cannot locate' On Wed, Mar 18, 2015 at 1:09 PM, Nicholas Smit wrote: > fuslogvw ( >

[sqlite] Multiple instances of the same program accessing the same db file

2015-05-02 Thread J Decker
Yes, it really requires only a little additional work on application side. The native open will open it in read/write share allow, and handle interlocking. if you get a result of SQLITE_BUSY you need to retry the operation after a short time. On Sat, May 2, 2015 at 4:52 PM, Scott Doctor wrote:

[sqlite] Fortify SCA Buffer Overflow in sqlite3.c

2015-05-14 Thread J Decker
C allows declaration of arrays at the end of structures. If the structure is allocated with a known addtional space, then this is not an issue. Likely the index will be greater than 1... so the issue would be that it would appear to overflow anyway. However, various C compilers have various

[sqlite] AUTOINC vs. UUIDs

2015-05-21 Thread J Decker
"Just to chime in here: First off, how are you going to generate them? How will you avoid collisions? Why should it be necessary to using that much storage space for a primary key and what's the reason for not using blazingly-fast integers?..." chance of collision is slim... it's a truly large

[sqlite] AUTOINC vs. UUIDs

2015-05-21 Thread J Decker
Sorry to be argumentative. I'll drop it. On Thu, May 21, 2015 at 4:44 AM, Mark Straver < sqlite-users-list at palemoon.org> wrote: > On 21/05/2015 09:33, J Decker wrote: > > chance of collision is slim... it's a truly large amount of bits... > > There's libuuid for linux,

Re: [sqlite] transaction in one thread and other thread also trying to write data

2014-05-13 Thread J Decker
It works best to have a connection per thread. On Tue, May 13, 2014 at 6:12 AM, d b wrote: > Hi all, > > >My application is multithreaded. It maintains only connection per > application. Database accessed by single process only. ThreadA will do > database write

Re: [sqlite] Using SQLite's VFS in C++

2014-05-13 Thread J Decker
the name that gets passed is the one you pass to sqlite_open... so just use that as an indicator of which object to use and in the open callback, result with the appropriate object... or don't use the name and ignore it? snprintf( somebuf, sizeof( somebuf ) / sizeof( somebuf[0] ), "%p",

Re: [sqlite] DELETE & INSERT vs. REPLACE

2014-05-29 Thread J Decker
> > > Can someone tell me what an appropriate use for REPLACE is? > > Replace might be used if you had a user_permission_info table, and were editing things about the user like maybe lastname/staffID ... password... but then with replace you MUST reference all unique keys...but basicallly the user

Re: [sqlite] Sqlite3 handler uses

2014-05-30 Thread J Decker
option D; use a single connection per thread. Take advantage of __thread ... and each thread can see if( !database_connection ) connect(). -or- make A thread that you queue all work to; but you'd still need a seperate connection for each reader... Open and close are a large hit to do per

Re: [sqlite] Application with 'grid' form for entering table data wanted

2014-06-03 Thread J Decker
You didn't list C#(mono,silverlight(uhmm not sure what mono called it) for web) in your repitroire; but a DataGridView filled from a DataAdapter is a few lines of code to get a editable table view. A few more lines and you get auto updating; cells are format protected (prevent entering text as a

Re: [sqlite] Android sqlite error

2014-06-12 Thread J Decker
/data/data/com.android.bluetooth/databases/btopp.db-journal should be /data/data/com.android.bluetooth/files/databases/btopp.db-journal and some systems don't allow making subdirectories in files so my library would make it more like

Re: [sqlite] Suggestion for SHELL impovement (built-in scripting)

2014-06-18 Thread J Decker
Stored procedures variables, a goto(jump/branch) and a conditional so loops can be made; On the topic of shell results; isn't there a result value of like number of records inserted ? So something like var a = insert... select $a; and then test the output sort of? went searching cause I

Re: [sqlite] Hexadecimal integer literals

2014-07-23 Thread J Decker
Seems like adding hex interpreting is just adding code for the sake of adding code. Unless the data is coming from some pre written text file, isn't just just as easy to format an into into decimal as it is for hex without having to add extra characters for the prefix?

Re: [sqlite] Cross-Platform ADO wrapper for iOS, Android and Win 8.1 WP 8.1?

2014-08-11 Thread J Decker
maybe ... http://www.unixodbc.org/ On Mon, Aug 11, 2014 at 10:47 AM, Ken Wenyon wrote: > Is there ADO Support for SQLite using Windows 8.1 and Windows Phone 8.1? > I am looking for a Cross-Platform ADO wrapper for iOS, Android and Win 8.1 > WP 8.1? > > > Ken Wenyon >

Re: [sqlite] Database is locked !

2014-08-27 Thread J Decker
Sounds like you have statements laying around that weren't properly destroyed... you say executed correctly, but then also released correctly? On Wed, Aug 27, 2014 at 6:14 AM, Fabrice MAUPIN wrote: > Hi all, > > > > I try to execute an "INSERT" query and I obtain this message

Re: [sqlite] Create join and add unique column

2014-09-16 Thread J Decker
could create a temporary table with a incrementing key and 'insert into temp_table select join ...' something like that? maybe use the existing keys and create a composite key sorta thing? On Tue, Sep 16, 2014 at 3:51 AM, Paul Sanderson < sandersonforens...@gmail.com> wrote: > I want to

Re: [sqlite] [sqlite-dev] Is there an option to not lock during transaction?

2011-06-13 Thread J Decker
just don't try to use shared cache it works... I thought I had disabled cache before alone and still got the same results... On Sun, Jun 12, 2011 at 5:48 AM, Florian Weimer <f...@deneb.enyo.de> wrote: > * J. Decker: > >> I have enabled sqlite3_enable_shared_cache( 1 ); >&

[sqlite] Howto get string from pragma command

2011-06-14 Thread J Decker
How do I get the string after issuing a PRAGMA ? ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Howto get string from pragma command

2011-06-14 Thread J Decker
then it should return something other than SQLITE_DONE? On Tue, Jun 14, 2011 at 7:24 PM, Simon Slavin <slav...@bigfraud.org> wrote: > > On 15 Jun 2011, at 3:12am, J Decker wrote: > >> How do I get the string after issuing a PRAGMA ? > > Pretend you were issuing a S

Re: [sqlite] Critical issue

2011-06-22 Thread J Decker
This is actually probably a very simple problem. sqlite.net library is built as x86. Your project is probably built as 'anycpu' instead of 'x86' which allows it to try and run as x64 as appropriate, but it won't be able to use the x86 sqlite.net library. On Sat, Jun 18, 2011 at 5:47 AM, Cyrille

Re: [sqlite] Critical issue

2011-06-22 Thread J Decker
And the ieshims or whatever that doesn't show up in dependancy walker is standard behavior for any C# application. On Wed, Jun 22, 2011 at 12:55 PM, J Decker <d3c...@gmail.com> wrote: > This is actually probably a very simple problem.  sqlite.net library > is built as x86.  

Re: [sqlite] Ordered group by

2011-06-23 Thread J Decker
On Thu, Jun 23, 2011 at 8:37 AM, Jan Hudec wrote: > Hello All, > > Is there a way to do group by query with well defined order of calls to the > aggregate function? > > The problem is as follows. I have some objects in a database identified with > "obj_id". For each object, there are

Re: [sqlite] Storing/editing hierarchical data sets

2011-07-11 Thread J Decker
On Sun, Jul 10, 2011 at 10:52 AM, Christopher Melen wrote: > > Hi, > > > I am developing an application which analyses audio data, and I have recently > been looking into Sqlite as a possible file format. The result of an analysis > in my application is a

Re: [sqlite] Thinking about using SQLite on a windows file share with multiple client connections to it (is this a good idea?)

2011-07-13 Thread J Decker
On Wed, Jul 13, 2011 at 3:28 PM, Shawn Bice wrote: > > Hello, I'm thinking about using SQLite on a windows file share having > multiple clients reading and writing to the database. I think I understand > the gist of how this works via some really good docs on the SQLite

Re: [sqlite] Performance Improvement

2011-07-18 Thread J Decker
On Mon, Jul 18, 2011 at 9:30 AM, Igor Tandetnik wrote: > On 7/18/2011 11:10 AM, > abhisek...@gmail.com wrote: >> Sorry the mail was sent prematurely. Continuing ... >> 2. In a loop, read each address, >>                     for that address find the next time this address was

Re: [sqlite] LevelDB benchmark

2011-07-27 Thread J Decker
On Wed, Jul 27, 2011 at 6:22 PM, Stephan Wehner wrote: > There are some benchmark's at > http://leveldb.googlecode.com/svn/trunk/doc/benchmark.html > > I don't have anything to point to, but I thought sqlite3 does better > than stated there. > > In particular, 26,900

Re: [sqlite] Editing sqlite3 commands

2011-07-28 Thread J Decker
On Thu, Jul 28, 2011 at 1:08 PM, Jay A. Kreibich wrote: > On Thu, Jul 28, 2011 at 12:57:45PM -0700, km4hr scratched on the wall: >> >> Is there a way to edit SQL commands typed in on the command line? > >  Only if the "sqlite3" tool is compiled with a copy of the readline >  

[sqlite] Array or set type or some other indexable data?

2015-11-11 Thread J Decker
So I've used CTE to solve a simple problem... I'm tempted to use it to fix more problems... but I'm wondering how to select different values at different levels. I know there's like 'select * from table where column in ( set,of,things) ' but can I index into the set? is there some sort of way I

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread J Decker
On Thu, Nov 12, 2015 at 7:16 AM, E.Pasma wrote: > 12 nov 2015, om 07:02, J Decker: > > >> So I've used CTE to solve a simple problem... I'm tempted to use it to >> fix more problems... but I'm wondering how to select different values >> at different levels. I know

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread J Decker
,option4_values,11,NULL (index on option_id) On Thu, Nov 12, 2015 at 8:35 AM, J Decker wrote: > On Thu, Nov 12, 2015 at 7:16 AM, E.Pasma wrote: >> 12 nov 2015, om 07:02, J Decker: >> >> >>> So I've used CTE to solve a simple problem... I'm tempted to use it to >>>

[sqlite] Array or set type or some other indexable data?

2015-11-12 Thread J Decker
> So something like "select value from option_map_view where path is set type>"? > A path name like '/system/device/com port/1' is used as an array of names > here. Only the indexing with intst and substr is laborious. Maybe some > future SQLite version includes a group_split function to make

[sqlite] sqlite3_errmsg and wide char

2015-11-27 Thread J Decker
On Fri, Nov 27, 2015 at 12:17 AM, Scott Robison wrote: > On Thu, Nov 26, 2015 at 11:42 PM, Igor Korot wrote: > >> Hi, Scott, >> >> On Fri, Nov 27, 2015 at 1:01 AM, Scott Robison >> wrote: >> > On Thu, Nov 26, 2015 at 10:13 PM, Igor Korot wrote: >> >> >> >> Hi, >> >> Is there any way to have

[sqlite] journal files not always removed

2015-09-01 Thread J Decker
On Sat, Aug 15, 2015 at 1:59 PM, Richard Hipp wrote: > On 8/15/15, Ashwin Hirschi wrote: >> >>> But I also see that behavior dates back to 3.7.6 and maybe earlier. It >>> isn't something new. >>> (Testing on Ubuntu). >> >> Also, are you sure you testing things right? I thought URI support was >>

[sqlite] journal files not always removed

2015-09-10 Thread J Decker
Okay let's restart... maybe I misunderstood that Richard was able to reproduce this. I have figured out a simple script that with 3.8.11.1 windows (using binary download sqlite3.exe) causes the problem. running just 'sqlite3.exe' --- script --- .open test.db pragma journal_mode=wal; .open

[sqlite] Select after update get new or old values

2015-09-10 Thread J Decker
which values does it have? By definition it should be old values. On Thu, Sep 10, 2015 at 9:05 AM, Nguyen Dang Quang wrote: > Dear all, > > I am using System.Data.SQLite for my .Net 2.0 application. > > In the app, I always run a sequence like that: > > 1. Open connection to sqlite and

[sqlite] Compiling SQLite dll 64 bits in MSVS

2016-04-05 Thread J Decker
def files are obsolete. the instructions include setting SQLITE_API to __declspec(dllexport) which should do the job... unless there was a typeo On Tue, Apr 5, 2016 at 2:03 PM, GB wrote: > Strange. Runs fine here (also Win 7 Pro x64). But version 2.1 may have > problems with post-XP OS. Try V2.2

[sqlite] Compiling SQLite dll 64 bits in MSVS

2016-04-05 Thread J Decker
ll > -out:SQLite3_StdCall.dll > > add SQLITE_API=__declspec(dllexport) from like line 12... http://pavel.cernohorsky.name/blog/2015/09/sqlite_64-bit_binaries_for_windows_and_how_to_build_them_with_visual_studio_2015.php You missed the important part :) > RBS > > On Tue, Apr 5, 2016 at 10:05 PM, J Deck

[sqlite] autoincrement

2016-04-13 Thread J Decker
Yes, you can get the create statement from sqlite_master table On Wed, Apr 13, 2016 at 4:54 AM, Igor Korot wrote: > Hi, > Is it possible to get whether the column is set to autoincrement or not? > > PRAGMA table_info() does not give such info... > > Thank you. >

[sqlite] Primary key values can be NULL

2016-04-14 Thread J Decker
I would total expect any column I created without NOT NULL (double negative) to allow NULL whether INDEX or UNIQUE or PRIMARY is applied additionallywhat database does otherwise? MSSQL? On Thu, Apr 14, 2016 at 2:56 PM, R Smith wrote: > > > On 2016/04/14 10:23 PM, Cecil Westerhof wrote: >>

[sqlite] Is it possible that dropping a big table takes very long

2016-04-20 Thread J Decker
If you upload a file to google drive and later try to replace it with a different version google drive often corrupts it. Always delete and upload a new version. On Wed, Apr 20, 2016 at 4:04 PM, jungle Boogie wrote: > On 20 April 2016 at 14:55, Cecil Westerhof wrote: >> This one I download,

[sqlite] sqlite3 command line, read-only

2016-04-26 Thread J Decker
https://www.sqlite.org/wal.html "5. It is not possible to open read-only WAL databases. The opening process must have write privileges for "-shm" wal-index shared memory file associated with the database, if that file exists, or else write access on the directory containing the database file if

[sqlite] sqlite3 command line, read-only

2016-04-27 Thread J Decker
On Tue, Apr 26, 2016 at 10:56 PM, J Decker wrote: > https://www.sqlite.org/wal.html > > "5. It is not possible to open read-only WAL databases. The opening > process must have write privileges for "-shm" wal-index shared memory > file associated with the database

[sqlite] How to register System.Data.SQLite as a data source?

2016-04-27 Thread J Decker
Those look like the ODBC provider list... http://www.ch-werner.de/sqliteodbc/ On Wed, Apr 27, 2016 at 3:55 PM, Joe Mistachkin wrote: > > Drago, William wrote: >> >> I did look at Installer.cs, but I'm not knowledgeable enough to >> understand what it's doing. >> > > It modifies the registry

[sqlite] Illegal SQL not rejected

2016-04-29 Thread J Decker
On Fri, Apr 29, 2016 at 10:00 AM, Jann Roder wrote: > Hi, > It seems like a too obvious omission to not be intentional. But I wonder why > a query like > > SELECT SUM(A) > FROM TABLE > GROUP BY B > HAVING A <> 0 > > Is not rejected. MS SQL server gives you this error message in this case: > >

[sqlite] json_group_array

2016-02-05 Thread J Decker
I think maybe it would be more appropriate to return a blank element. It would fill an index point, but be skipped and unused in cases of iterating the loop... http://www.2ality.com/2013/07/array-iteration-holes.html Was thinking that javascript forEach et al. methods skipped null (or undefined

[sqlite] What's the reason for alias names not being visible in subqueries?

2016-02-08 Thread J Decker
On Mon, Feb 8, 2016 at 12:47 AM, Paul wrote: > Hello! > > I am curious what is a particular reason that aliased columns in a query not > visible to sub-queries? > > CREATE TABLE foo( > id INTEGER, > bar INTEGER > ); > > INSERT INTO foo VALUES(1, 2), (3, 4); > > SELECT 1 as super_id,

[sqlite] What's the reason for alias names not being visible in subqueries?

2016-02-08 Thread J Decker
On Mon, Feb 8, 2016 at 3:38 AM, Paul wrote: > I see, thank you for pointing out. > > I wanted to use it on table with conditional relations with 3 different child > tables. > Though I could use a trick and fit data selection into one query, efficiently. > Alas I am forced to stick to 2 queries.

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
windows W is wide-char not utf-16. as much as A is ansi and isn't utf-8 On Fri, Feb 12, 2016 at 1:07 PM, Warren Young wrote: > On Feb 12, 2016, at 1:49 PM, Clemens Ladisch wrote: >> >> Olivier Mascia wrote: >>> Are there Windows platforms, supported by SQLite source code of course, >>> where

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
016 at 4:05 PM, J Decker wrote: > >> windows W is wide-char not utf-16. >> as much as A is ansi and isn't utf-8 >> > > Has Windows ever supported a wide character set that was not UCS-2 or > UTF-16? I've always understood Microsoft embraced UCS-2 specifically so

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 5:32 PM, Igor Tandetnik wrote: > On 2/12/2016 7:24 PM, J Decker wrote: >> > What character in what ANSI codepage ends up converted by mbstowcs to an > unpaired surrogate? > > What character in what ANSI codepage requires a surrog

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 7:05 PM, Warren Young wrote: > On Feb 12, 2016, at 4:42 PM, Scott Robison wrote: >> >> I find it kind of interesting that Microsoft takes a lot >> of (deserved) flack for not adhering to standards, yet UTF-8 came about >> specifically because some didn't want to use UCS-2

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 7:37 PM, Igor Tandetnik wrote: > On 2/12/2016 10:14 PM, J Decker wrote: >> >> mbstowcs( out, utf8, 5 ); > > > mbstowcs expects the string in the codepage of the current locale - which is > never UTF-8. > >> for( n = 0; n < 5; n++ ) &

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 8:00 PM, Igor Tandetnik wrote: > On 2/12/2016 10:44 PM, J Decker wrote: >> >> On Fri, Feb 12, 2016 at 7:37 PM, Igor Tandetnik >> wrote: >>> >>> It performs the conversion it is documented to perform. It indeed doesn't >>&

[sqlite] Windows A and W APIs dual support

2016-02-12 Thread J Decker
On Fri, Feb 12, 2016 at 8:00 PM, Igor Tandetnik wrote: > On 2/12/2016 10:44 PM, J Decker wrote: >> >> On Fri, Feb 12, 2016 at 7:37 PM, Igor Tandetnik >> wrote: >>> >>> It performs the conversion it is documented to perform. It indeed doesn't >>&

[sqlite] SQLite crashing

2016-01-25 Thread J Decker
On Mon, Jan 25, 2016 at 8:31 AM, Teg wrote: > Hello Igor, > > extern "C" __declspec(dllexport) void DestroyObject(Database *db) > { > delete db; > } > > It was my impression that each DLL got it's own heap so, memory > allocated inside the DLL needs to be free'd inside the DLL. I use >

[sqlite] sqldiff.c : 2 benign warnings in 64 bits builds

2016-01-26 Thread J Decker
should be (size_t) instead of (int) though... since size_t will retain the precision... and then back propagate the change to the function return type and the things receiving the return... then you don't need the cast anyway. On Tue, Jan 26, 2016 at 3:37 AM, Richard Hipp wrote: > On 1/26/16,

[sqlite] Recover corrupt database

2016-01-27 Thread J Decker
I was wondering if the backup api (sqlite3_backup_init, et al. ) will help to recover a corrupt DB? All the other mechanisms are an export and re-import into a new DB... The database exists in a encrypted database that it's really difficult to get the keys outside of the program and I don't look

[sqlite] Recover corrupt database

2016-01-27 Thread J Decker
n another database, but rather a encrypted vfs. I assume it happened while debugging and stopping at a breakpoint and aborting the process; in general use I don't expect this to happen. *sigh* guess I get to implement the 'hard' way then. > https://www.sqlite.org/howtocorrupt.html > > -j >

[sqlite] Find out how many times does SQLite hit the disk?

2016-01-30 Thread J Decker
could use a tool like ProcMon and filter to disk activity on a specified file to see... https://technet.microsoft.com/en-us/sysinternals/processmonitor.aspx?f=255=-2147217396 On Sat, Jan 30, 2016 at 3:21 PM, Simon Slavin wrote: > > On 30 Jan 2016, at 9:31pm, dpb wrote: > >> On windows, is there

  1   2   3   4   >