Re: [sqlite] Date time input

2019-10-08 Thread Kevin Benson
On Tue, Oct 8, 2019 at 2:40 PM James K. Lowden 
wrote:

> On Tue, 8 Oct 2019 09:06:24 -0700
> Jens Alfke  wrote:
>
> > I think the idea of a semi-official ?SQLite++? has been floated here
> > before
>
> OK, but it needs a better name. --
>

SQLiteXTD

   --
  --
 --Ö¿Ö--
K e V i N
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [EXTERNAL] Re: Documentation update request

2019-08-16 Thread Kevin Benson
On Fri, Aug 16, 2019 at 3:15 AM Hick Gunter  wrote:

> Reminds me of "... two mice ran up the clock, the clock struck one, and
> the other escaped with minor injuries"
>

'Twas my impetus (rather than the wording that mistakenly sounded like I
was "besmirching" Dr. Hipp)


>
> -Ursprüngliche Nachricht-
> Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> Im Auftrag von Kevin Benson
> Gesendet: Donnerstag, 15. August 2019 20:40
> An: SQLite mailing list 
> Betreff: [EXTERNAL] Re: [sqlite] Documentation update request
>
> On Thu, Aug 15, 2019 at 2:33 PM Jose Isaias Cabrera 
> wrote:
>
> > Richard Hipp, on Thursday, August 15, 2019 01:32 PM, wrote...
> > >
> > > On 8/15/19, Simon Slavin, on
> > > > On 15 Aug 2019, at 5:20pm, Richard Damon, on
> > > >
> > > >> You under quote, the faq says it “can not be changed (except
> > > >> under extra-ordinary conditions).”, and those extra-ordinary
> > > >> conditions are
> > a
> > > >> link to the second section you mention.
> > > >
> > > > I didn't notice that, for some reason.  Thanks for the correction.
> > >
> > > You didn't notice it because I only added it moments ago, in
> > > response to your documentation update request.
> >
> > Oh! Trickery!
> >
> >
> Dickery (sometimes a nickname for RICHARD ;-)

Doc (...umentation; the something Richard "Dick" Hipp was doing ;-)
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Documentation update request

2019-08-15 Thread Kevin Benson
On Thu, Aug 15, 2019 at 2:33 PM Jose Isaias Cabrera 
wrote:

> Richard Hipp, on Thursday, August 15, 2019 01:32 PM, wrote...
> >
> > On 8/15/19, Simon Slavin, on
> > > On 15 Aug 2019, at 5:20pm, Richard Damon, on
> > >
> > >> You under quote, the faq says it “can not be changed (except under
> > >> extra-ordinary conditions).”, and those extra-ordinary conditions are
> a
> > >> link to the second section you mention.
> > >
> > > I didn't notice that, for some reason.  Thanks for the correction.
> >
> > You didn't notice it because I only added it moments ago, in response
> > to your documentation update request.
>
> Oh! Trickery!
>
>
Dickery (sometimes a nickname for RICHARD ;-)
Doc (...umentation; the something Richard "Dick" Hipp was doing ;-)
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE_LOCKED means "database table is locked"?

2019-06-19 Thread Kevin Benson
On Wed, Jun 19, 2019 at 12:12 PM Carsten Müncheberg <
carsten.muencheb...@native-instruments.de> wrote:

> Am 19.06.2019 um 16:47 schrieb Igor Tandetnik:
> > On 6/19/2019 10:39 AM, Carsten Müncheberg wrote:
> >> Is there really something like a table lock?
> >
> > Yes there is: https://sqlite.org/sharedcache.html
>
> Thanks, I wasn't aware of that.
>
>
 There's an inadvertent word omission in the second stanza under Table
Level Locking:

 IS To read data a table, a connection must first obtain a
read-lock.
SHOULD BE To read data from a table, a connection must first obtain a
read-lock.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Usage of temporary files of SQLite3 on Android / SQLite commands fail

2018-06-10 Thread Kevin Benson
On Sun, Jun 10, 2018 at 12:45 PM skywind mailing lists <
mailingli...@skywind.eu> wrote:

> Hi,
>
> but to which directory should I set it? There is no general tmp directory
> accessible.
>
> Regards,
> Hartwig
>
> > Am 2018-06-10 um 02:30 schrieb Bob Friesenhahn <
> bfrie...@simple.dallas.tx.us>:
> >
> > On Sat, 9 Jun 2018, skywind mailing lists wrote:
> >
> >> Hi,
> >>
> >> currently I am not creating large subqueries or views and therefore
> storing the temporary data in memory is a solution but I would like to have
> a future proof solution. And I do not like to think about it anymore in the
> future.
> >
> > Have you tried setting the POSIX standard TMPDIR environment variable?
> This might have useful influence under Android.
> >
> > Bob
>
>
Android is foreign to me, but the thread below mentions: /data/local/tmp

https://stackoverflow.com/a/41105574/1828624
--
   --
  --
 --Ö¿Ö--
K e V i N
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] ROWID....

2018-06-09 Thread Kevin Benson
On Sat, Jun 9, 2018 at 7:03 AM Luuk  wrote:

>
> In the docs (https://www.sqlite.org/autoinc.html) it says:
> In SQLite, table rows normally have a 64-bit signed integer ROWID
>  
>
> Question:
> Why it this a signed integer, and not an unsigned integer?
>
> Simply by choice? of is there something more to say about this?
>

http://sqlite.1065341.n5.nabble.com/Use-of-AUTOINCREMENT-td74775.html#a74786
--
   --
  --
 --Ö¿Ö--
K e V i N
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Fwd: Problem on Windows 10 machines

2017-09-10 Thread Kevin Benson
I wonder if the answer at this following inquiry is suggesting that your
last posted results are unremarkable:

https://stackoverflow.com/questions/11872539/windbg-crash-dump-analysis
and that suggested alternative approach may be more helpful than WinDbg ?

--
   --
  -- "
 --Ö¿Ö--
K e V i N

On Sat, Sep 9, 2017 at 10:23 AM, Bart Smissaert 
wrote:

> I did debugging with WinDbg and got the following with !analyse:
>
> GetUrlPageData2 (WinHttp) failed: 12002.
> DUMP_CLASS: 2
> DUMP_QUALIFIER: 0
> FAULTING_IP:
> ntdll!LdrpDoDebuggerBreak+30
> 7ffb`0a4871b8 cc  int 3
> EXCEPTION_RECORD:  (.exr -1)
> ExceptionAddress: 7ffb0a4871b8
> (ntdll!LdrpDoDebuggerBreak+0x0030)
>ExceptionCode: 8003 (Break instruction exception)
>   ExceptionFlags: 
> NumberParameters: 1
>Parameter[0]: 
> FAULTING_THREAD:  1b24
> BUGCHECK_STR:  BREAKPOINT
> DEFAULT_BUCKET_ID:  BREAKPOINT
> PROCESS_NAME:  COM32on64.exe
> ERROR_CODE: (NTSTATUS) 0x8003 - {EXCEPTION}  Breakpoint  A breakpoint
> has been reached.
> EXCEPTION_CODE: (HRESULT) 0x8003 (2147483651) - One or more arguments
> are invalid
> EXCEPTION_CODE_STR:  8003
> EXCEPTION_PARAMETER1:  
> WATSON_BKT_PROCSTAMP:  56efa71c
> WATSON_BKT_PROCVER:  1.0.0.0
> PROCESS_VER_PRODUCT:  COM32on64
> WATSON_BKT_MODULE:  ntdll.dll
> WATSON_BKT_MODSTAMP:  a329d3a8
> WATSON_BKT_MODOFFSET:  d71b8
> WATSON_BKT_MODVER:  10.0.15063.447
> MODULE_VER_PRODUCT:  Microsoft® Windows® Operating System
> BUILD_VERSION_STRING:  10.0.15063.447 (WinBuild.160101.0800)
> MODLIST_WITH_TSCHKSUM_HASH:  38cbe79f85e7dfdb265ff9afb82039794b9b5c6a
> MODLIST_SHA1_HASH:  6299f03ade45bd5452864c8b494e355b11bc3b25
> NTGLOBALFLAG:  70
> PROCESS_BAM_CURRENT_THROTTLED: 0
> PROCESS_BAM_PREVIOUS_THROTTLED: 0
> APPLICATION_VERIFIER_FLAGS:  0
> PRODUCT_TYPE:  1
> SUITE_MASK:  784
> DUMP_TYPE:  fe
> ANALYSIS_SESSION_HOST:  DESKTOP-9UDFVUA
> ANALYSIS_SESSION_TIME:  09-09-2017 14:37:25.0292
> ANALYSIS_VERSION: 10.0.15063.468 amd64fre
> THREAD_ATTRIBUTES:
> OS_LOCALE:  ENG
> PROBLEM_CLASSES:
> ID: [0n300]
> Type:   [@APPLICATION_FAULT_STRING]
> Class:  Primary
> Scope:  DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
> BUCKET_ID
> Name:   Omit
> Data:   Add
> String: [BREAKPOINT]
> PID:[Unspecified]
> TID:[Unspecified]
> Frame:  [0]
> PRIMARY_PROBLEM_CLASS:  BREAKPOINT
> LAST_CONTROL_TRANSFER:  from 7ffb0a442b28 to 7ffb0a4871b8
> STACK_TEXT:
> `0009f2b0 7ffb`0a442b28 : `0040 `0003
> ` `0021d000 : ntdll!LdrpDoDebuggerBreak+0x30
> `0009f2f0 7ffb`0a47a1fc : ` `
> ` `0001 : ntdll!LdrpInitializeProcess+0xfa4
> `0009f720 7ffb`0a429b1b : 7ffb`0a3b `
> ` `0021d000 : ntdll!_LdrpInitialize+0x506cc
> `0009f7a0 7ffb`0a429ace : `0009f820 `
> ` ` : ntdll!LdrpInitialize+0x3b
> `0009f7d0 ` : ` `
> ` ` : ntdll!LdrInitializeThunk+0xe
> THREAD_SHA1_HASH_MOD_FUNC:  f6d506c4546bb5d137f475a99d6cb238658f395a
> THREAD_SHA1_HASH_MOD_FUNC_OFFSET:  6cbeafe1708871adca27efbe26e88c
> d700c132ee
> THREAD_SHA1_HASH_MOD:  421247e39d7ac2afa4b65a67c08f22894942361d
> FOLLOWUP_IP:
> ntdll!LdrpDoDebuggerBreak+30
> 7ffb`0a4871b8 cc  int 3
> FAULT_INSTR_CODE:  4800ebcc
> SYMBOL_STACK_INDEX:  0
> SYMBOL_NAME:  ntdll!LdrpDoDebuggerBreak+30
> FOLLOWUP_NAME:  MachineOwner
> MODULE_NAME: ntdll
> IMAGE_NAME:  ntdll.dll
> DEBUG_FLR_IMAGE_TIMESTAMP:  0
> STACK_COMMAND:  dt ntdll!LdrpLastDllInitializer BaseDllName ; dt
> ntdll!LdrpFailureData ; ~0s ; kb
> BUCKET_ID:  BREAKPOINT_ntdll!LdrpDoDebuggerBreak+30
> FAILURE_EXCEPTION_CODE:  8003
> FAILURE_IMAGE_NAME:  ntdll.dll
> BUCKET_ID_IMAGE_STR:  ntdll.dll
> FAILURE_MODULE_NAME:  ntdll
> BUCKET_ID_MODULE_STR:  ntdll
> FAILURE_FUNCTION_NAME:  LdrpDoDebuggerBreak
> BUCKET_ID_FUNCTION_STR:  LdrpDoDebuggerBreak
> BUCKET_ID_OFFSET:  30
> BUCKET_ID_MODTIMEDATESTAMP:  0
> BUCKET_ID_MODCHECKSUM:  1dd2f4
> BUCKET_ID_MODVER_STR:  10.0.15063.447
> BUCKET_ID_PREFIX_STR:  BREAKPOINT_
> FAILURE_PROBLEM_CLASS:  BREAKPOINT
> FAILURE_SYMBOL_NAME:  ntdll.dll!LdrpDoDebuggerBreak
> FAILURE_BUCKET_ID:  BREAKPOINT_8003_ntdll.dll!LdrpDoDebuggerBreak
> WATSON_STAGEONE_URL:
> http://watson.microsoft.com/StageOne/COM32on64.exe/1.0.0.
> 0/56efa71c/ntdll.dll/10.0.15063.447/a329d3a8/8003/
> 000d71b8.htm?Retriage=1
> TARGET_TIME:  2017-09-09T13:37:25.000Z
> OSBUILD:  15063
> OSSERVICEPACK:  447
> SERVICEPACK_NUMBER: 0
> OS_REVISION: 0
> OSPLATFORM_TYPE:  x64
> OSNAME:  Windows 10
> OSEDITION:  Windows 10 WinNt SingleUserTS Personal
> USER_LCID:  0
> OSBUILD_TIMESTAMP:  

Re: [sqlite] Problem compiling 3.17.0 in MSVS 12

2017-02-14 Thread Kevin Benson
On Tue, Feb 14, 2017 at 7:56 PM, Bart Smissaert 
wrote:

> I had to install WinZip though and at the first unzip I got directly to the
> files whereas now I had a .tar file first and had to unzip that.
>

Following on from David Empson's post... the WinZip docs show an
Advanced->File handling option named  that
likely facilitated your .TAR file attempt:
http://kb.winzip.com/help/HELP_CONFIG_MISC.htm
--
   --
  --
 --Ö¿Ö--
K e V i N
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Retrieve INTEGER PRIMARY KEY

2017-02-07 Thread Kevin Benson
On Tue, Feb 7, 2017 at 4:11 PM, Clyde Eisenbeis  wrote:

> int iKeyID = (int)sqliteCmd.ExecuteScalar();
>

I believe the type of last_insert_rowid() is *always* INT64

--
   --
  --
 --Ö¿Ö--
K e V i N
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] new user seeking help

2017-01-05 Thread Kevin Benson
 On Thu, Jan 5, 2017 at 1:26 PM, Chen, Hui  wrote:

> Hi there,
>
> I just recently started integrating System.Data.SQLite.dll into my
> project, I started with a very simple winform application.
>
> I have a very simple method to create a connection, txtSqliteFile is
> textbox for db file location.
> SQLiteConnection GetConnection()
> {
> string connectionString = "Data Source=" + txtSqliteFile.Text +
> ";Version=3;datetimeformat=CurrentCulture";
> SQLiteConnection conn = new SQLiteConnection(connectionString);
> return conn;
> }
>
> Then in a button handler I have these to open a connection.
>
> SQLiteConnection conn = GetConnection();
> conn.Open();
>
> whenever Open method is called, Following exception thrown
> Attempted to read or write protected memory. This is often an indication
> that other memory is corrupt.
>
> If I remove [STAThread] attribute from Main, it opens connections without
> problem, but my OpenFileDialgue blows up, I have to have [STAThread] on
> Main method.
> SQLite documentation says that I can change the threading model, but
> doesn't say how this can be achieved in C#. all examples are in C/C++
>
> Can anyone give me a hint?
>

https://richnewman.wordpress.com/2007/04/08/top-level-exception-handling-in-windows-forms-applications-part-1/

--
   --
  --
 --Ô¿Ô--
K e V i N


>
> Thanks
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Out of date online documents

2016-12-31 Thread Kevin Benson
 On Sat, Dec 31, 2016 at 4:04 PM, Simon Slavin <slav...@bigfraud.org> wrote:

>
> On 31 Dec 2016, at 8:59pm, Kevin Benson <kevin.m.ben...@gmail.com> wrote:
> >
> > The Home page Search *DOES* result in linking to
> > "other dot commands" but *NOT*
> > "special commands to sqlite3 dot commands" nor
> > "rules for dot commands".
>
> Because there are no such commands.
>
> The dot commands are part of the SQLite command-line tool and are
> documented in the web page for that tool.  The tool itself implements
> them.  They are not part of SQLite itself.
>

Not sure what you mean, the site has a page for the command-line tool and
the OP was looking (at the site) for reference to "dot command"
info. When anyone types 'dot' or 'dot command' (as search terms) into the
Search facility on the Home page of sqlite.org a top result page link
points to https://sqlite.org/cli.html#other_dot_commands ( go ahead ...do
it ;-) Now that search result is related to the HREF's in the HTML that I
listed (from cli.html)...BUT the other HREF's (for the same keywords) DO
NOT come up in the search results ...and that may be because the HREF's
with trailing underscores are not being indexed.

--
   --
  --
 --Ô¿Ô--
K e V i N


>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Out of date online documents

2016-12-31 Thread Kevin Benson
On Sat, Dec 31, 2016 at 3:20 PM, Paul Lambert  wrote:

> Web search.  In fact I cannot find any link on the sqlite.org page that
> links to the (dot) functions, alias special functions.
>
>
The Home page Search *DOES* result in linking to
"other dot commands" but *NOT*
"special commands to sqlite3 dot commands" nor
"rules for dot commands".

I wonder if the trailing underscores in the underlying HTML are somehow
deleterious ?

1.
Getting Started
2.
Double-click Startup On Windows
--->3. Special commands to
sqlite3 (dot-commands)
--->4. Rules for
"dot-commands"
5. Changing
Output Formats
6. Writing
results to a file
6.1. File I/O
Functions
7. Querying
the database schema
8. CSV Import
9. CSV Export
10. Converting
An Entire Database To An ASCII Text File
11. Loading
Extensions
--->12. Other Dot
Commands
13.
Using sqlite3 in a shell script
14. Ending shell
commands
15. Compiling the
sqlite3 program from sources

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] enabling FK in VisualStudio

2016-09-24 Thread Kevin Benson
On Sat, Sep 24, 2016 at 5:14 AM, denis  wrote:

> Hello all, I want enabling foreign key in the file app.config of visual
> studio 2015 is-it possible? if yes, what is the string?
> I tested connectionString = "data source=d:\db.sqlite; ForeignKeys=true;"
> but the FK does not work.
> thanks
>

The accompanying .CHM file shows the Parameter as ForeignKeys, not
ForeignKeys. Have you tried that?

http://s11.postimg.org/qy2q9attf/2016_09_24_085430.jpg

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Conversion failure

2016-06-23 Thread Kevin Benson
--
   --
  --
 --Ô¿Ô--
K e V i N

On Thu, Jun 23, 2016 at 10:38 AM, Igor Korot  wrote:

> Hi, Clemens,
>
> On Thu, Jun 23, 2016 at 10:33 AM, Clemens Ladisch 
> wrote:
> > Igor Korot wrote:
> >> I am trying to find out why the following code fails to do proper
> conversion.
> >> It works if the tableName have "abcd", but fails if it has "abcß" (the
> >> German letter for the "ss" (looks like Greek letter beta)).
> >>
> >> const unsigned char *tableName = sqlite3_column_text( stmt, 0 );
> >> pimpl->m_tables[m_catalog].push_back( Table( myconv.from_bytes( (const
> char *) tableName ), fields, foreign_keys ) );
> >
> > What are the byte values in tableName?
>
> I have no idea.
> I just did ALT+225 in the SQLite shell during the CREATE TABLE command.
>
> Thank you.
>
>
Have you tried changing to Windows UTF-8 codepage by issuing
>chcp 65001
at the Windows command prompt, before starting the SQLite shell and doing
ALT+225 during the CREATE TABLE command ?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Order with another sequence

2015-10-09 Thread Kevin Benson
> On Fri, Oct 9, 2015 at 5:08 AM, Cecil Westerhof 
> wrote:
>
> > When I use ORDER BY an ? comes after a z. Is it possible to make an ?
> come
> > after a z?
> >
> > If it is important I am using SQLite 3.8.6 and Python 3.4.1.
>

Perhaps you might garner some insight from looking at other's code?
I did a search on GitHub of APSW (Another Python SQLite wrapper) by Roger
Binns:

https://github.com/rogerbinns/apsw/search?utf8=%E2%9C%93=collation

--
   --
  --
 --???--
K e V i N


[sqlite] DbFunctions.TruncateTime

2015-08-24 Thread Kevin Benson
On Sun, Aug 23, 2015 at 10:53 PM, Joe Mistachkin 
wrote:

>
> The LINQ provider for System.Data.SQLite does not provide this function
> directly; however, it may be possible to use one of the core date-time
> related SQL functions to do it?
>
> https://www.sqlite.org/lang_datefunc.html
>


Maybe something involving the "unixepoch" modifier ...via the connection
string in App.config ?

http://stackoverflow.com/questions/30444222/sqlite-and-entityframework-formatexception-on-timestamp

--
   --
  --
 --???--
K e V i N


[sqlite] : it seems to be only orber by and group

2015-08-22 Thread Kevin Benson
On Sat, Aug 22, 2015

> afriendandmore wrote:
> > The table shall be ordered according to A. (Order by A)
> > But if C ist true and to the value B1 in this Record, there exists
> another Record with B2 and B2 = B1, then B1 should be ordered in the row
> above B2.


If the B1 and B2, to which you refer, are just two equal values in
different rows of column B, then it sounds like you want:

SELECT * FROM table
 ORDER BY columnA, columnB
 CASE WHEN columnC = 1
 THEN 0 ELSE 1 END;

If neither ASC or DESC are specified, rows are sorted in ascending (smaller
values first) order by default.
--
   --
  --
 --???--
K e V i N


[sqlite] Database sybchronisation

2015-08-13 Thread Kevin Benson
On Thu, Aug 13, 2015 at 4:05 AM, Chris Parsonson  wrote:

> So can someone give me a working example of two database ATTACHed and a
> simple select using columns from a table in each database


C:\SQLite3>sqlite3 C:\SQLite3\UpdateWolfpro.db3
SQLite version 3.8.11.1 2015-07-29 20:00:57
Enter ".help" for usage hints.
sqlite> CREATE TABLE Items (
[Category] VARCHAR(50) NOT NULL,
[Supplier] VARCHAR(50) DEFAULT 'Default',
[Product Code] VARCHAR(20) NOT NULL,
[Short Description] VARCHAR(50),
[Long Description] VARCHAR(1000),
[Unit Price] INTEGER,
[Maximum Sample Quantity] INT,
[Box Price] INTEGER,
[Box Quantity] INT,
[Deleted] VARCHAR(5) DEFAULT 'No',
[Item Image File Path] VARCHAR(100),
[Last Update] TIMESTAMP, CONSTRAINT
[sqlite_autoindex_Items_1] PRIMARY KEY ([Product Code]));
sqlite> .quit

C:\SQLite3>sqlite3 C:\SQLite3\Wolfpro.db3
SQLite version 3.8.11.1 2015-07-29 20:00:57
Enter ".help" for usage hints.
sqlite> CREATE TABLE Items (
[Category] VARCHAR(50) NOT NULL,
[Supplier] VARCHAR(50) DEFAULT 'Default',
[Product Code] VARCHAR(20) NOT NULL,
[Short Description] VARCHAR(50),
[Long Description] VARCHAR(1000),
[Unit Price] INTEGER,
[Maximum Sample Quantity] INT,
[Box Price] INTEGER,
[Box Quantity] INT,
[Deleted] VARCHAR(5) DEFAULT 'No',
[Item Image File Path] VARCHAR(100),
[Last Update] TIMESTAMP, CONSTRAINT
[sqlite_autoindex_Items_1] PRIMARY KEY ([Product Code]));
sqlite> attach 'C:\SQLite3\UpdateWolfpro.db3' as UPD;
sqlite> INSERT INTO main.Items (
[Category], [Product Code]) VALUES("resistor", "300ohm");
sqlite> INSERT INTO UPD.Items (
[Category], [Product Code]) VALUES("capacitor", "47uf");
sqlite> SELECT * FROM UPD.Items;
capacitor|Default|47uf|||No||
sqlite> SELECT * FROM main.Items;
resistor|Default|300ohm|||No||
sqlite> DELETE FROM UPD.Items;
sqlite> SELECT * FROM UPD.Items;
sqlite> SELECT * FROM main.Items;
resistor|Default|300ohm|||No||
sqlite> .quit

C:\SQLite3>

--
   --
  --
 --???--
K e V i N


[sqlite] System.Data.SQLite encryption

2015-08-06 Thread Kevin Benson
On Thu, Aug 6, 2015 at 4:16 AM, Marco Bambini  wrote:

> Anyone know which encryption algorithm is used in System.Data.SQLite?
> Seems like it doesn?t use the standard SEE sqlite extension.
>

https://www.mail-archive.com/sqlite-users at sqlite.org/msg87770.html

--
   --
  --
 --???--
K e V i N


[sqlite] ATTACH Problem

2015-07-31 Thread Kevin Benson
On Fri, Jul 31, 2015 at 3:38 AM, Chris Parsonson  wrote:

> Forgot to add the code
> Public Function SynchroniseDB() As Boolean
> Dim dbConnection As New SQLiteConnection
> Dim dbDataSet As New DataSet
> Dim SQLStmt As String
> Dim sDBPath As String = Application.StartupPath & "\wolfpro.db3"
> Dim sUpdateDBPath As String = Application.StartupPath &
> "\UpdateWolfpro.db3"
> Try
> If dbConnection.State = ConnectionState.Closed Then
> dbConnection.ConnectionString = "Data Source=" & sDBPath &
> ";New=True;Compress=True;Synchronous=Off"
> dbDataSet.Locale = CultureInfo.InvariantCulture
> dbConnection.Open()
> dbDataSet.Reset()
> End If
> SQLStmt = "ATTACH '" & sUpdateDBPath + "' AS UPD;"
>

Should that + be a &
?

--
   --
  --
 --???--
K e V i N


> Dim dbcommand As SQLiteCommand = dbConnection.CreateCommand
> With dbcommand
> .CommandText = SQLStmt
> .ExecuteNonQuery()
> .Dispose()
> End With
> SQLStmt = "DELETE FROM UPD.Items;"
> Dim dbcommand2 As SQLiteCommand = dbConnection.CreateCommand
> With dbcommand2
> .CommandText = SQLStmt
> .ExecuteNonQuery()
> .Dispose()
> End With
> Return True
> Catch ex As Exception
> MessageBox.Show(ex.Message)
> Return False
> End Try
> End Function
>
>
> On 31 July 2015 at 09:37, Chris Parsonson  wrote:
>
> > Thanks,
> > Here is my code again, hopefully with typing errors corrected. The attach
> > and the delete run without generating any errors, but the delete does not
> > work
> >
> > On 31 July 2015 at 09:25, Rowan Worth  wrote:
> >
> >> Chris, you have an extra pair of single quotes in your original code
> >> compared to Simon's suggestion. Also in your parameter-based attempt you
> >> have a typo when assigning the path (@DNName instead of @DBName).
> >>
> >> Hope that helps,
> >> -Rowan
> >>
> >>
> >> On 31 July 2015 at 15:09, Chris Parsonson  wrote:
> >>
> >> > That's exactly what I started with, then somebody suggested using a
> >> > parameter
> >> >
> >> > On 31 July 2015 at 09:02, Simon Slavin  wrote:
> >> >
> >> > >
> >> > > On 31 Jul 2015, at 5:32am, Chris Parsonson 
> >> wrote:
> >> > >
> >> > > >SQLStmt = "ATTACH '" & sUpdateDBPath & "' AS UPD"
> >> > >
> >> > > This is not the correct syntax for the ATTACH command.  The name of
> >> the
> >> > > file to be attached is not a value, it's just included in the
> >> command.  I
> >> > > would expect you to have better results using something like
> >> > >
> >> > > SQLStmt = "ATTACH " & sUpdateDBPath & " AS UPD"
> >> > >
> >> > > You must, of course, make sure that the sUpdateDBPath specifies a
> >> place
> >> > > that your application does have access to.  You can test this by
> >> > inserting
> >> > > a few test lines which open a database of that location.
> >> > >
> >> > > Simon.
> >> > > ___
> >> > > sqlite-users mailing list
> >> > > sqlite-users at mailinglists.sqlite.org
> >> > >
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >> > >
> >> >
> >> >
> >> >
> >> > --
> >> > Chris Parsonson
> >> > 083 777 9261
> >> > ___
> >> > sqlite-users mailing list
> >> > sqlite-users at mailinglists.sqlite.org
> >> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >> >
> >> ___
> >> sqlite-users mailing list
> >> sqlite-users at mailinglists.sqlite.org
> >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >>
> >
> >
> >
> > --
> > Chris Parsonson
> > 083 777 9261
> >
>
>
>
> --
> Chris Parsonson
> 083 777 9261
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] SQLite transaction time limit

2015-07-08 Thread Kevin Benson
http://permalink.gmane.org/gmane.comp.db.sqlite.general/91411

 'In the connection string, please use "Default Timeout"...'
*SNIP*
 'Also, the "Default Timeout" value is measured in seconds, so it would
be...'
*SNIP*

-> 30 in your case.

--
   --
  --
 --???--
K e V i N

On Wed, Jul 8, 2015 at 4:44 AM, Iryna Atamanova  wrote:

> Hi guys,
>
> I will be very appreciate for your help.
>
> We have found the next feature of sqllite - it transaction takes more that
> 5 seconds, the database has been locked for some time. Could you please
> help us and let me know how we can increase this time - 5 seconds to 30 for
> example (what parameter / attribute can be used?)  from source code .
>
> Our project is implemented on .Net CF and we use SQLite version 3.8.
>
> Best regards,
> Ira Atamanova
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


[sqlite] Weird FTS bugs (wrong, missing and false positive results)

2015-07-06 Thread Kevin Benson
On Mon, Jul 6, 2015 at 8:23 AM,  wrote:

>
>
>  ---  ? ---
> ?? : "Dan Kennedy" 
> : 2  2015, 14:26:05
>
>
> > On 07/02/2015 09:24 PM, Kevin Benson wrote:
> >> FTFY, you're welcome ;-)
> > Now *MAYBE* someone can read it and possibly reply.
> >>
>


> *SNIP*
>


>
> Sorry for the delayed reply, I was traveling these days.
>
> Thanks, Kevin! What was the problem with the line breaks? When I sent it,
> it looked fine.
>
>
I don't know that our receiving end could tell what was wrong with what you
sent:

http://sqlite.1065341.n5.nabble.com/Weird-FTS-bugs-wrong-missing-and-false-positive-results-td82936.html
. 

Suffice to say that my edit was only fair to poor (still too wide for Gmail
reply) ...but provided enough impetus.

Cheers~
--
   --
  --
 --???--
K e V i N


[sqlite] Weird FTS bugs (wrong, missing and false positive results)

2015-07-02 Thread Kevin Benson
FTFY, you're welcome ;-)
Now *MAYBE* someone can read it and possibly reply.

--
   --
  --
 --???--
K e V i N

On Thu, Jul 2, 2015 at 9:11 AM,  wrote:

> We use SQLite for indexing and searching the text contents of our app
> using FTS4
> (about 27k unique words, about 1 million words for the whole contents). In
> particular,
> we use the offsets function. Currently, after some testing, we?re
> experiencing a plenty
> of problems with finding the results needed.
>
> For the forms of the words searching we use the ?all-to-all? way, which
> means we have
> some standard English endings and words forms and modify the initial
> request so that
> all possible combinations are included and separated by OR from each
> other.
>
> I. e. if we have two forms and two words in the request (for simplicity),
> that would look
> like (the MATCH part):
>
> ?(word1_form1 NEAR/10 word2_form1)
> OR (word1_form1 NEAR/10 word2_form2)
> OR (word1_form2 NEAR/10 word2_form1)
> OR (word1_form2 NEAR/10 word2_form2)?.
>
> Initially, the problem appeared that the query returned offsets for
> absolutely wrong words.
> While searching for ?honest fair?, we got words like ?good?, ?sport?,
> ?natural? offsets.
> We moved from the system provided (iOS, OS X) SQLite (version 3.8.5,
> further called
> ?old SQLite?) to the latest one available on the official site (version
> 3.8.10.2,
> further called ?new SQLite? or just ?SQLite?), which solved the issue, but
> returned offsets
> for words which were not near (according to NEAR/10). I supposed it?s
> because the request
> was too big because of lots of the words forms. But, for example, this
> request
>
> for ?offense is rank?:
> select documents.name, contents.rowid, part, offsets(contents)
> from contents left join documents on contents.document_id = documents.id
> where text match '(\"offense\" NEAR/10 \"is\" NEAR/10 \"rank\")'
> order by document_id
>
> returned the correct results, while this one returned false positive
> results (0 stands for
> apostrophe so it?s not interpreted as a separate token for the simple
> tokenizer we use):
>
> select documents.name, contents.rowid, part, offsets(contents)
> from contents left join documents on contents.document_id = documents.id
> where text match '(\"offense\" NEAR/10 \"is\" NEAR/10 \"rank\")
> OR (\"offense\" NEAR/10 \"is\" NEAR/10 \"rank0s\")'
> order by document_id
>
> The experiments revealed that ?rank0s? can be whatever: ranks",
> "rankqwerty" and so on,
> even "rankqwertyvrfbgbrevwkefovmwpsrvrm" or "yugbuoiipkipnuo?. If it's
> removed, nothing
> found. If after that the first word is modified, the one correct result
> found. Also, a
> search for ?speak again? didn?t find the results at all, though there
> should be quite a
> lot of them.
>
> The ?database disk image is malformed? error was reported, but integrity
> check completed
> with no errors, the database was recreated and that didn?t help, meanwhile
> the old SQLite
> did find the results for this request in exactly that file with no error
> reported.
>
> Also, the new SQLite worked well for the same request if the offsets
> function was replaced
> with the snippet function (that also solved the false positive results
> problem described
> above). The search for ?father? returned not all results. For example, the
> first result
> which can manually be found in the contents table using SQLite Database
> Browser for this
> request:
>
> select documents.name, contents.rowid, part, offsets(contents)
> from contents left join documents on contents.document_id = documents.id
> where text match '(\"father\")
> OR (\"fathere\") OR (\"fathering\")
> OR (\"fatherish\") OR (\"fathers\")
> OR (\"fatheres\") OR (\"fatherian\")
> OR (\"fatheral\") OR (\"father0s\")'
> and document_id in (25)
> order by document_id
>
> missed when actually searched, the snippet function doesn?t help here,
> neither helps
> searching for a single word form. Error logging with
>
> sqlite3_config(SQLITE_CONFIG_LOG, errorLogCallback, NULL)
>
> was never called.
>  Any ideas?
>


[sqlite] VBA Sqllite blob data

2015-05-12 Thread Kevin Benson
On Tue, May 12, 2015 at 7:41 AM, Preston King  wrote:

> I have been able to use SQLite2009 Pro Management Studio to export the
> specific record from the DB3 file into Excel without any issues, the entire
> record appears correctly. I was trying to create VBA code within Excel to
> do the same thing. The blob record is a form of html code, it doesn't
> follow any typical code pattern so I had to write code to extract the data
> that I needed for the report(s). I have successfully created the routines
> and the report works well.
>
> So the only part that I am having difficulty with is automating the
> importing of the record from the DB3 file into my worksheet. SQLite Studio
> exports the record that I need into an Excel worksheet just fine. I then
> copy the record into the worksheet that I created and execute my routines
> to produce the reports that have been requested. I am trying to have as
> little user interaction as possible.
>
> Thanks,
> Preston
> -Original Message-
> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:
> sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Daniel Sj?din
> Sent: Monday, May 11, 2015 12:22 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] VBA Sqllite blob data
>
> Hi,
>
> Have a look at the last post in this thread. Never tested this but if true
> then maybe it's an idea to try to implement it in vba part of
> sqliteforexcel.
>
>
> http://stackoverflow.com/questions/2516702/getting-around-the-max-string-size-in-a-vba-function
>
> Regards,
> Daniel
> Den 11 maj 2015 18:17 skrev "Bart Smissaert" :
>
> > What is in the blob?
> > What are you trying to see when you dump it to the sheet?
> >
> > RBS
> >
> > On Mon, May 11, 2015 at 2:27 PM, Preston King 
> > wrote:
> >
> > > I have a db3 config file that contains several different records. I
> > > need to select one specific record and store it in an excel
> > > worksheet cell. I have been able to create a routine to extract the
> > > information that I need once I get the record into a worksheet cell.
> > > The problem that I have run into is the record is longer than 255
> > > characters and gets truncated at
> > that
> > > limit.
> > >
> > >
> > > -Original Message-
> > > From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:
> > > sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Bart
> > Smissaert
> > > Sent: Friday, May 08, 2015 5:23 PM
> > > To: General Discussion of SQLite Database
> > > Subject: Re: [sqlite] VBA Sqllite blob data
> > >
> > > What do you mean with: into Excel? Into a cell in the worksheet,
> > > into a VBA variable?
> > > What code did you try? I never use blobs, but I don't think it
> > > should be
> > a
> > > problem.
> > >
> > > RBS
> > >
> > >
> > >
> > > On Fri, May 8, 2015 at 8:15 PM, Preston King 
> > > wrote:
> > >
> > > > Does anyone have an example of how to read sqlite blob records,
> > > > that are not pictures, into Excel? I have been trying to find some
> > > > VBA code to do this but am not having much luck. Thanks



I, too, believe SQLite for Excel is your best bet (as others have
suggested) so to add to the information supplied... I noticed mention of:

 *XLSQLite.xlam *
http://www.gatekeeperforexcel.com/other-freebies.html

"It uses SQLite for Excel to interact with SQLite databases and provides a
simple GUI that facilitates the creation and manipulation of SQLite
databases directly from within Excel. It also provides functionality to
execute SELECT statements directly from within an Excel array formula and
return the result in a range of cells."

--
   --
  --
 --???--
K e V i N


[sqlite] Error while creating view through command line

2015-04-23 Thread Kevin Benson
On Thu, Apr 23, 2015 at 5:16 AM, Manoj Kumar Pasumarthi <
manojkumar.pa at hcl.com> wrote:

> Kevin, I am getting two rows as follow:
>
> 0|main|
> 2|sprdb|C:\Users\manojkumar.pa
> \Desktop\SP\DBManagementService\Data\SP_R3.s3db
>
> Regards,
> Manoj
>
> -Original Message-
> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:
> sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Kevin Benson
> Sent: Thursday, April 23, 2015 2:43 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Error while creating view through command line
>
> On Thu, Apr 23, 2015 at 4:58 AM, Manoj Kumar Pasumarthi <
> manojkumar.pa at hcl.com> wrote:
>
> > Thanks for the reply Kevin. But it didn't worked.
> >
>
> If you issue the following after you do your ATTACH:
>
>
> PRAGMA database_list;
>
>
> do you see a row returned for that database you are Attaching?



Looks like you're going to have to provide more information to the list,
about your code setup and environment, than...
...'My database is getting corrupted and I'm getting a non-SQLite error.'

--
   --
  --
 --???--
K e V i N


[sqlite] Error while creating view through command line

2015-04-23 Thread Kevin Benson
On Thu, Apr 23, 2015 at 4:58 AM, Manoj Kumar Pasumarthi <
manojkumar.pa at hcl.com> wrote:

> Thanks for the reply Kevin. But it didn't worked.
>

If you issue the following after you do your ATTACH:


PRAGMA database_list;


do you see a row returned for that database you are ATTACHing?

--
   --
  --
 --???--
K e V i N


[sqlite] Error while creating view through command line

2015-04-23 Thread Kevin Benson
On Wed, Apr 22, 2015 at 11:49 AM, Manoj Kumar Pasumarthi <
manojkumar.pa at hcl.com> wrote:

> Hi,
>
> I am trying to create a new view through command line script (sqlite3) as
> follow:
>
>
> attach 'SP_R3.s3db' as sprdb;
>
> BEGIN TRANSACTION;
>
>
> CREATE view sprdb.[view1] as select model from sprdb.[windturbine];
>
> COMMIT;
>
> .exit
>
> After executing this script, DB is getting corrupted.
>
> Can anyone please tell me how to create a new view through scripts. Sample
> view is fine.
>
> Please tell me whether it is possible or not.
>


Here's a wild hunch/guess. Try removing the underscore from your database
name:


attach 'SPr3.s3db' as sprdb;

BEGIN TRANSACTION;


CREATE view sprdb.[view1] as select model from sprdb.[windturbine];

COMMIT;

.exit


--
   --
  --
 --???--
K e V i N


[sqlite] Result code differs running commands from script file and from console

2015-03-15 Thread Kevin Benson
On Sun, Mar 15, 2015 at 5:19 AM, Petr L?z?ovsk?  wrote:

> As far as I understood you comment (english is not my first language),
> executing script could not provided specified resultcode because many fails
> can occur and exitcode is only one?
>

Essentially, yes. The result code of 1 appears to have been created for
it's own explicit informational purpose(s) and obviously it was reported
first. That is all.


>
> But multiple fails can occurs on long cmdline too. What happens on this
> case? My logic says the internal sqlite command parser stop on first error
> founded, set-up exitcode, print error message and terminate. After
> correction this error, than start displaying second error, until all errors
> are corrected (ideal).
>
> L.
>

Well, beyond the result codes document itself, the implementation details
for this case (per cmdline within the shell) are discoverable by you
and may depend upon which of a variety of (third-party) command-line
editing libraries, the sqlite3 command-line shell program is linked against.


>
> > On Sat, Mar 14, 2015 at 7:33 AM, Petr L?z?ovsk? wrote:
>
> > Just discovered the resulcodes differ if perform:
>
> >   
> >   sqlite3.exe %db% < script.sql
>
> >   the %errorlevel% is 1
> >   
>
> >   but by
>
> >   
> >   sqlite3.exe %db% "UPDATE table SET '='";
>
> >   the errorlevel is 19 (correct as by "
> https://www.sqlite.org/c3ref/c_abort.html;)
> >   --
>
> >   both command produce same (correct) erromessage:
>
> >   Error: near line 1: UNIQUE constraint failed: table.
>
>
>
> >   Why I got different exitcodes? Is is possible to get proper exitcode
> if command loaded from script file too?
>
>
>
> > According to your logic ...which error code do you believe should be
> returned if a plurality of the SQLite statements in your piped script file
> were to cause some variety of different  error events?
>
>
--
   --
  --
 --???--
K e V i N


[sqlite] Result code differs running commands from script file and from console

2015-03-14 Thread Kevin Benson
On Sat, Mar 14, 2015 at 7:33 AM, Petr L?z?ovsk?  wrote:

> Just discovered the resulcodes differ if perform:
>
> 
> sqlite3.exe %db% < script.sql
>
> the %errorlevel% is 1
> 
>
> but by
>
> 
> sqlite3.exe %db% "UPDATE table SET '='";
>
> the errorlevel is 19 (correct as by "
> https://www.sqlite.org/c3ref/c_abort.html;)
> --
>
> both command produce same (correct) erromessage:
>
> Error: near line 1: UNIQUE constraint failed: table.
>
>
>
> Why I got different exitcodes? Is is possible to get proper exitcode if
> command loaded from script file too?


According to your logic ...which error code do you believe should be
returned if a plurality of the SQLite statements in your piped script
file were to cause some variety of different  error events?

--
   --
  --
 --???--
K e V i N


Re: [sqlite] Client/Server Best Practices

2015-01-07 Thread Kevin Benson
On Wed, Jan 7, 2015 at 11:47 PM, Keith Medcalf  wrote:

> On Wednesday, 7 January, 2015 20:01, James K. Lowden <
> jklow...@schemamania.org> said:
> >On Fri, 02 Jan 2015 21:41:02 -0700
> >"Keith Medcalf"  wrote:
> >> On Friday, 2 January, 2015 16:26, James K. Lowden
> >>  said:
> >>
> >> >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.  SELECT does
> >> >not modify the database.  To "commit a select" is to apply the
> >> >nonchanges.
> >>
> >> It does not matter whether it modifies the database.  "reading" the
> >> database requires a lock -- a shared lock.  "updating" the database
> >> requires a "write" lock, which precludes obtaining a "shared" lock.
> >
> >When I first read your answer my reaction was, "yes, yes, of course".
> >But I'm not sure where that leaves the OP.  Are you suggesting select
> >statements work "better" in some sense with autocommit turned off?
>
> No.  However, when you perform an update in the same transaction (and
> connection) as you are performing the select, when the select is not
> completed yet, and you commit on the connection, it is to be expected that
> AHWBL.
>
> >In passing I suggest *requires* is not true in general.  It may be that
> >SQLite and other implementations use locks to mediate access and
> >implement ACID semantics.  Locks are just one popular way to accomplish
> >that, not the only one.
>
> >Your description of transaction implementation is illuminating.  If I
> >understand correctly, you're describing an odd set of
> >design choices.
> >
> >> BEGIN TRANSACTION does not acquire a lock -- BEGIN IMMEDIATE does
> >> that -- BEGIN TRANSACTION merely turns off autocommit, meaning that
> >> the lock will not be released magically, but rather by an explicit
> >> COMMIT (which itself does not do anything -- it merely turns
> >> autocommit back on so that the next statement will commit the
> >> transaction before magically acquiring a new lock).
>
> >I find this very peculiar.  You aren't saying is that
> >
> >   begin transaction;
> >   insert into T value (1);
> >   commit;
> >   [sqlite3_close]
>
> >leaves the database unchanged (because there's no "next statement")?
> >If not, and there's a power outage between (successful) commit and
> >closing the connection, what will be the state of the database on
> >restart?  Is the transaction still open or, if not, is it rolled
> >forward and completed, or rolled back?
>
> I am not certain exactly where the COMMIT performs the commit.  It could
> very likely commit and then turn autocommit back on.  Whatever so, it makes
> no difference really.
>
> >> However, execution of a SELECT statement does cause a lock to be
> >> obtained (a shared lock) and a COMMIT does cause that shared lock to
> >> be released.
>
> >Again, I find this surprising.  I would expect SELECT to
> >
> >1.  establish a shared lock
> >2.  select the data
> >3.  release the lock
>
> Except that this is not what the OP is doing.  The OP is performing a
> COMMIT in the middle of the select running.  He is doing this:
>
> 1.  establish the lock
> 2.  select the first of one of many rows of data
> 3.  release the lock forcibly (COMMIT)
> 4.  read the next row of data from the select
> 5.  release the lock forcibly (COMMIT)
> ... lather rinse repeat steps 4 and 5 until you reach the end of the
> selected rows
>
> >whether or not BEGIN is called.  If I understand what commit does per
> >your description above, in a "transaction", the effect would be
>
> >1.  BEGIN TRANSACTION (autocommit off)
> >2.  SELECT (take shared lock)
> >3.  data data data
> >4.  [SELECT  done] (release shared lock)
> >5.  COMMIT (autocommit on)
> >
> >which leaves steps #1 and #5 redundant.
>
> >> Executing an UPDATE after a SELECT -- in the same connection -- (or
> >> while a select is in progress) will escalate the SHARED lock to a
> >> WRITE lock.
>
> >OK, this is typical.
>
> >> COMMIT will release "the lock" -- "the lock" is now a WRITE lock, not
> >> a shared lock.  Therefore the next _step() will be executing without
> >> any lock at all leading to apparently undefined results (really an
> >> error should be thrown "SQLITE_DATABASE_UNLOCKED_FROM_UNDER_ME" or a
> >> MISUSE error, but is not).
>
> >Good to know.  I hope we agree this is unlovely, and intersects with
> >SQLite's unfortunate property of not isolating SELECT as atomic.  (By
> >which I mean: if there are 10 rows in a table and connection 1 issues
> >"SELECT * FROM T" and between calls 4 & 5 to sqlite3_step another
> >connection 2 issues "DELETE FROM T", the first process may get 4 or 5
> >rows, or 10, depending on luck of the draw.)
>
> No, it was the other persons choice to do this.  He could have run the
> select entirely, then done the updates.  Or he 

Re: [sqlite] Encrypted database

2014-12-13 Thread Kevin Benson
On Sat, Dec 13, 2014 at 9:08 PM, Igor Tandetnik  wrote:
>
> On 12/13/2014 2:29 PM, Mujtaba Ali Panjwani wrote:
>
>> I have created an encrypted database using visual studio plugin of
>> system.data.sqlite. Now whichever other database management software than
>> VS, I try to open that database is failing.
>>
>
> Isn't that the whole point? You've encrypted the database precisely so
> that it can't be opened by other tools, only by your application, haven't
> you? If not, what was the goal of the exercise?
>
> If you want the database to be accessible via any SQLite database
> management tool, don't encrypt it.
> --
> Igor Tandetnik
>

-> OR ...seek tools that are compatible with the encryption used:

On Tue, Nov 25, 2014 at 1:58 PM, Joe Mistachkin 
wrote:
>
>
> Krenn Christoph wrote:
> >
> > However I would like to know which encryption algorithm is used by
> > System.Data.SQLite, v1.0.94.0?
> >
>
> The legacy encryption support in System.Data.SQLite uses the CryptoAPI
> with the constants PROV_RSA_FULL and MS_ENHANCED_PROV, as described
> here:
>
>
>
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa386986%28v=vs.85%2
> 9.aspx
>
> The exact algorithm and key strength selected probably depends on the
> version of Windows being used.
>
> --
> Joe Mistachkin
>

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite data source not available

2014-10-14 Thread Kevin Benson
On Tue, Oct 14, 2014 at 11:47 AM, coffeenkfc  wrote:

> Thanks Joe,
>
> I removed the line, cleaned the solution, rebuilt, and still don't see
> 'System.Data.Sqlite Database File' in the 'Choose Data Source' window. :(


> Is there a way to get older versions of the setup bundle? Some time ago on
> a
> different machine I was able install 1.0.93.0. I wonder if this is
> something
> related to 1.0.94.0.
>

I just tried substituting the string 1.0.93.0 in place of 1.0.94.0 in the
download link URLs (both places) and got offered a download. Maybe that'll
do ya, until Joe Mistachkin (the maintainer) sees this and can respond.


--
   --
  --
 --Ô¿Ô--
K e V i N


>
>
>
> --
> View this message in context:
> http://sqlite.1065341.n5.nabble.com/sqlite-data-source-not-available-tp78521p78601.html
> Sent from the SQLite mailing list archive at Nabble.com.
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unicode support in SQLite

2014-10-14 Thread Kevin Benson
On Tue, Oct 14, 2014 at 4:37 AM, Aleksey Tulinov 
wrote:

> Hello,
>
> I'm glad to announce that nunicode SQLite extension was updated to support
> Unicode-conformant case folding and was improved on performance of every
> component provided to SQLite.
>
> You can read about and download this extension at BitBucket page of
> nunicode library: https://bitbucket.org/alekseyt/nunicode#markdown-
> header-sqlite3-extension
>
> This extension provides the following Unicode-aware components:
>
> - upper(X)
> - lower(X)
> - X LIKE Y ESCAPE Z
> - COLLATE NU700 : case-sensitive Unicode 7.0.0 collation
> - COLLATE NU700_NOCASE : case-insensitive Unicode 7.0.0 collation
>

https://bitbucket.org/alekseyt/nunicode/downloads/libnusqlite3-1.4-4a0e4773-win32.zip
<---
404 response code

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite data source not available

2014-10-10 Thread Kevin Benson
On Fri, Oct 10, 2014 at 11:55 AM, Ben Lam  wrote:

> Hi,
>
> Really appreciate any help, spent a day and a half trying to figure this
> out without success. I can't get 'System.Data.SQLite Database File' to show
> up as an option I the 'choose data source' window.
>
> My environment: VS2010 SP1, WIN 8.1 PRO
>
> 1. Installed sqlite-netFx40-setup-bundle-x86-2010-1.0.94.0.exe, ran as
> Administrator, checkmarked 'Install the designer components for Visual
> Studio 2010', avast! antivirus disabled
> 2. Created new WPF project
> 3. Used Nuget package manager console: Install-Package System.Data.SQLite
> 4. Right click on project, Add -> Data -> ADO.NET 
> Entity Data Model; Generate from database; New Connection, in the 'Choose
> Data Source' window I don't see 'System.Data.Sqlite Database File' as
> expected
>
> Snippet from app.config:
>
> < DbProviderFactories>
>description=".NET Framework Data Provider for SQLite"
> type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
>   
>   
>invariant="System.Data.SQLite.EF6" description=".NET Framework Data
> Provider for SQLite (Entity Framework 6)"
> type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"
> />
> 
>   
>   
>  type="System.Data.Entity.Infrastructure.SqlConnectionFactory,
> EntityFramework" />
> 
>type="System.Data.Entity.SqlServer.SqlProviderServices,
> EntityFramework.SqlServer" />
>type="System.Data.SQLite.EF6.SQLiteProviderServices,
> System.Data.SQLite.EF6" />
> 
>   
>
>
>

Did you already do as Joe asked ?

http://sqlite.1065341.n5.nabble.com/sqlite-data-source-not-available-td78521.html

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Version info in doc pages

2014-09-21 Thread Kevin Benson
http://www.sqlite.org/changes.html

2014-02-03 (3.8.3)
•Added support for common table expressions and the WITH clause.


--
   --
  --
 --Ô¿Ô--
K e V i N

On Sun, Sep 21, 2014 at 8:46 AM, HarryD  wrote:

> I find it something of a shortcoming that the doc pages (
> http://www.sqlite.org/lang_with.html) do not mention the applicable
> version
> of sqlite.
>
> Example: I read about the 'with clause'.  Exciting!  But when trying it, it
> didn't work because I am using an older version. Not that old but still old
> enough.
>
> Nowhere on the doc page is any mention of the first version it appeared
> in.  That would have been really helpful, and I think it is critical that
> it should appear there!
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Does the Connection string support UNC paths?

2014-09-07 Thread Kevin Benson
On Sun, Sep 7, 2014 at 12:46 AM, Chris  wrote:

> I am old database programmer that just came across SQLite and am working on
> a small project for a PVR that uses SQLite as it's db provider.  I try
> specifying a UNC path to the database for the datasource in the connection
> string and I get the following error, "unable to open database file".   .
> When I look at the exception generated, I see an errorcode = 14.  However,
> if I map a network drive, I can open the file and work with it.  I am
> running Windows 7 x64 Pro and system.data.sqlite version 1.0.93.0 with dot
> net framework 4.0 and Visual Studio 2010.
>
>
>
> Obviously SQLite supports UNC paths because I am using SQLite database
> browser to open the same database using a UNC path.
>
>
>
> Any help would be apreicated, thanks!
>

http://sqlite.1065341.n5.nabble.com/System-Data-SQLite-and-UNC-Paths-td72920.html

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] User-visible doc anchors [WAS: Severe performance degradation]

2014-08-22 Thread Kevin Benson
On Fri, Aug 22, 2014 at 3:13 AM, Dominique Devienne 
wrote:

> On Thu, Aug 21, 2014 at 8:44 PM, Richard Hipp  wrote:
>
> > Additional discussion can be found at:
> >
> >   http://www.sqlite.org/optoverview.html
> >   http://www.sqlite.org/queryplanner-ng.html
>
>
> Richard,
>
> The SQLite doc is part of the reason I'm a fan of SQLite, but some of its
> pages can be rather long, with many sections ( sub-headers), and when
> wanting to send a link to a particular section, I don't see an easy way to
> get the proper #section anchor. When looking at the HTML source, I can see
> the anchors are there, but that's far from convenient.
>
> Could there be a way to easily get a direct URL to each section? Either via
> a TOC in each page, or the header being a link to itself, or when you hover
> on the header, a paragraph symbol appears that one can click to "jump" to
> the anchor?
>
> The doc being generated, I assume a simple change to the generator would be
> enough to get this across the whole doc? This would IMHO further improve
> the usability of the doc. Thank you for considering this change request.
> Best regards, --DD


Meanwhile, you can mark some text on a linked page, in yellow, like this:

http://www.sqlite.org/mark/optoverview.html?Without+the*ANALYZE

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Need help on SQLite In-Memory Mode

2014-08-11 Thread Kevin Benson
On Mon, Aug 11, 2014 at 9:19 PM, Nick Bao  wrote:

> Thanks, Joe!
>
> But it did not work for me.
>
> Still got the error:
> System.ArgumentException: Invalid ConnectionString format for parameter
> "FullUri"
>
>
>
Are you using System.Data.SQLite version > *1.0.81.0 ?*

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] error "malformed database schema" on view in attached table

2014-07-01 Thread Kevin Benson
On Tue, Jul 1, 2014 at 5:07 AM, Gert Van Assche  wrote:

> All,
>
> I get this error message:
>
> malformed database schema (WrongTargetLang) - view [WrongTargetLang] cannot
> reference objects in database main
>
> when I try to attach a database containing a view. If I delete the view, I
> get this message for another view. I get that message for all views.
>
> I can open that DB without any problem, but when I open it as an attached
> db in the sqlite3 shell (in windows), this happens.
>
> Anyone any idea what is happening?
>
> thanks
>
> gert


Perhaps you're referencing- main -in your view?
http://comments.gmane.org/gmane.comp.db.sqlite.general/51366

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Error: database is locked

2014-06-18 Thread Kevin Benson
On Wed, Jun 18, 2014 at 6:17 PM, JohnG <4par...@gmail.com> wrote:

> gelmjw@voyager /var/www/sqlite3/finviz $ cd /var/www/sqlite3/finviz/;
> sqlite3 -init finviz.init finviz.db
> ~SNIP~
> How do I clear this lock condition?
>

>
Maybe try it like this instead:

gelmjw@voyager /var/www/sqlite3/finviz $ cd /var/www/sqlite3/finviz/;
sqlite3 finviz.db http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Bug report: column name includes table alias when CTE is used

2014-04-21 Thread Kevin Benson
On Mon, Apr 21, 2014 at 8:29 AM, Richard Hipp  wrote:

> On Mon, Apr 21, 2014 at 1:16 AM, Andre  wrote:
>
> > Hi,
> >
> > Apparently when a CTE is used, the column name includes the table alias.
> > However, when no CTE is used, the alias is not present in the returned
> > column name.
> >
> > SQLite version 3.8.4.3 2014-04-03 16:53:12
> > Enter ".help" for usage hints.
> > Connected to a transient in-memory database.
> > Use ".open FILENAME" to reopen on a persistent database.
> > sqlite> create table X (columnA int);
> > sqlite> insert into X values (1);
> > sqlite> .header on
> > sqlite> select alias.columnA from X alias;
> > *columnA*
> > 1
> > sqlite> with CTE as (select columnA from X) select alias.columnA from CTE
> > alias;
> > *alias.columnA*
> > 1
> > sqlite>
> >
> > I experienced this when rewriting a query to use CTE in an application
> that
> > based some logic on the column name. I'd expect not to see the alias
> either
> > way. Is this a bug or is it expected for CTEs?
> >
>
> See
> http://www.sqlite.org/c3ref/mark/column_name.html?If+there+is+n*fiedfor
> further information.
>
>
Fixed this link for myself and future referrers:

http://www.sqlite.org/c3ref/mark/column_name.html?If+there+is+n*fied

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Syntax diagram in draft docs for sqlite 3.8.3 confuses me

2014-01-30 Thread Kevin Benson
On Thu, Jan 30, 2014 at 10:58 AM, Richard Hipp  wrote:

> Documentation on SELECT statements at
> http://www.sqlite.org/draft/lang_select.html has now been updated and
> amplified.
>
>
> On Thu, Jan 30, 2014 at 5:52 AM, Zsbán Ambrus  wrote:
>
> > Hi!
> >
> > I'm writing to you about the syntax diagram that appears on
> > "http://sqlite.org/draft/lang_select.html;, and is a draft for the
> > next version of sqlite (3.8.3).  I find this diagram confusing, and
> > would rather prefer to have something similar to
> > "http://sqlite.org/lang_select.html;, only of course updated to show
> > the syntax changes in 3.8.3.
>
>

Minor documentation corrections for:
http://www.sqlite.org/draft/lang_select.html


IS than than SHOULD BE than
* than than a result

IS are the same are SHOULD BE are the same get
* are the same are assigned

IS optional SHOULD BE optionally
* may be optional preceded by

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] "Common Table Expression"

2014-01-24 Thread Kevin Benson
On Fri, Jan 24, 2014 at 10:09 AM, Clemens Ladisch wrote:

> Richard Hipp wrote:
> > Please see http://www.sqlite.org/draft/lang_with.html for draft
> > documentation of the new Common Table Expression implementation for
> SQLite
> > 3.8.3.  Comments, criticism, and typo-corrections are appreciated.
>
> Duplicated "the":
>
>   * If a UNION operator connects the the initial-select ...
>

IS where SHOULD BE were

* An ordinary common table expression works as if it where a view ...


IS where SHOULD BE it were

* Then the row containing 2 is used as if where the complete content ...


IS ORDERBY SHOULD BE ORDER BY

* The "ORDERBY checkin.mtime DESC" term ...


IS by all mtime, SHOULD BE all by mtime,

* ... thousands of ancestors, sort them by all mtime, ...


IS breath SHOULD BE breadth

* 5 occurrences on this documentation page


IS undertaking SHOULD BE undertaken

* ... is undertaking by ...


IS organization. SHOULD BE organization:

* ...within that organization.


IS string SHOULD BE string:

* ... Thus the input string

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Fw: System.Data.SQLite.dll

2014-01-17 Thread Kevin Benson
On Thu, Jan 16, 2014 at 11:18 PM, Joe Mistachkin wrote:

>
> RadSolution wrote:
> >
> > The version info for this file states that it is version 91.0.77.0 dated
> 31/01/2012 12:59
> > This is used in several of our legacy systems (without any problems that
> I'm aware of).
> >
>
> Judging from some of the version information in the file, it looks like the
> source code may
> have originated from the System.Data.SQLite project; however, no official
> release bears the
> version number you mention (i.e. 91.0.77.0).  It might be a fork.  I have
> no
> idea where it
> comes from.
>
> >
> > Every tool I've tried - including LINQpad - says that the database is
> either an encrypted
> > file or not a database, yet the DLL mentioned above (which created it)
> can
> open it ok, as
> > can an Android app.
> >
>
> The database may be encrypted with the CryptoAPI based codec used in the
> legacy versions of
> System.Data.SQLite or something else entirely.  It's extremely difficult to
> determine without
> knowing exactly where the source code used to build your DLL comes from.
>
>

Found a link that seemingly ties that version number to SQLCipher:

https://groups.google.com/forum/#!msg/sqlcipher/0mlJdejzgJ8/cqPkN6TCH78J

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Web application with SQLite

2013-12-31 Thread Kevin Benson
On Tue, Dec 31, 2013 at 6:17 PM, Tim Johnson  wrote:

> * Eduardo  [131231 07:11]:
> >
> > You can check mongoose webserver. It uses LUA for scripting web pages
> > (similar to PHP but with LUA) and Sqlite for db access from LUA.
>
>   I found what I believe is the mongoose page at
>   https://code.google.com/p/mongoose/
>   Very interesting!
>
>   BTW: See the following text at that page :
>   "Lua server pages (PHP-like functionality using Lua) with SQLite3,
>   see page.lp"
>   Where "page.lp" is a link to
>   https://github.com/cesanta/mongoose/blob/master/test/page.lp
>   That URL generates a 404 error.


https://groups.google.com/forum/#!msg/mongoose-users/OLY1hQnyHh8/uB0HAyITuCcJ

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] minor typo in documentation

2013-12-14 Thread Kevin Benson
http://sqlite.org/faq.html#q1

CURRENTLY:
"(If the largest possible integer key, 9223372036854775807, then an unused
key value is chosen at random.)"

SUGGESTED FIX:
"  (If the largest possible integer key 9223372036854775807 is in use, then
an unused key value is chosen at random.)"


http://www.sqlite.org/autoinc.html

CURRENTLY:
"If the largest ROWID is equal to the largest possible integer
(9223372036854775807) then the database engine starts picking positive
candidate ROWIDs at random until it finds one that is not previously used."

SUGGESTED FIX:
"If the largest ROWID in use is equal to the largest possible integer
(9223372036854775807) then the database engine starts picking positive
candidate ROWIDs at random until it finds one that is not previously used."

--
   --
  --
 --Ô¿Ô--
K e V i N


On Thu, Dec 12, 2013 at 9:11 AM, Richard Hipp  wrote:

> Thanks.  http://www.sqlite.org/docsrc/info/200941601a
>
>
> On Wed, Dec 11, 2013 at 1:23 PM, Jeff Widman  wrote:
>
> > https://www.sqlite.org/queryplanner.html
> >
> > Current: *Then in general the cost of doing the query proportional to
> > (K+1)*logN.*
> >
> > Suggested fix: *Then in general the cost of doing the query is
> proportional
> > to (K+1)*logN.*
> >
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Trouble with Journal_Mode Pragma

2013-11-16 Thread Kevin Benson
On Sat, Nov 16, 2013:

> Stephen Chrzanowski wrote:
> > I'm not sure why this code is breaking:
> >
> > procedure SaveDatabaseTo(fName:string);
> > var
> >   TempDB:tsqlitedatabase;
> > begin
> >   TempDB:=TSQLiteDatabase.Create(fName);
> >   TempDB.ExecSQL('PRAGMA journal_mode = OFF');
> >   db.Backup(TempDB);
> >   tempdb.free;
> > end;
> >
> > It fails at the PRAGMA statement.
>

Maybe it should be:

 TempDB.ExecSQL('PRAGMA journal_mode = OFF;');

(Note the additional semicolon in the string literal)

...as in the sample code at
http://www.itwriting.com/repos/sqlitewrapper/trunk/SQLiteTable3.pas

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] MATCH with punctuation in parenthesis causing error

2013-11-03 Thread Kevin Benson
On Mon, Nov 4, 2013 at 1:38 AM, David de Regt  wrote:

> I've worked around this issue a separate way, but I'd like to understand
> what went wrong in the first place here.  I have an FTS3 table, and if I
> query with the following:
>
> SELECT * FROM table WHERE keywords MATCH '(blah!)'
>
> I get the following error:
> malformed MATCH expression:_[(blah!)]
>
> If I remove either the parenthesis or the exclamation point, or add quotes
> around the parenthesis, the error disappears.  I've read over all of the
> FTS docs and I don't see any reason why it shouldn't work (though it should
> ignore it with the default tokenizer -- but if I have a custom tokenizer,
> it should support the !, in theory).  Any ideas?
>
> Thanks!
> -David
>


I believe (for backward compatibility
reasons) the SQLITE_ENABLE_FTS3_PARENTHESIS option comes into your
considerations as described in Compiling and Enabling FTS3 and FTS4 at:
http://www.sqlite.org/fts3.html#section_2 2

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3_last_insert_rowid() problem

2013-10-19 Thread Kevin Benson
On Sat, Oct 19, 2013 at 6:05 AM, Igor Korot <ikoro...@gmail.com> wrote:

> Hi, Kevin,
>
>
> On Sat, Oct 19, 2013 at 2:59 AM, Kevin Benson <kevin.m.ben...@gmail.com
> >wrote:
>
> > On Sat, Oct 19, 2013 at 5:46 AM, Igor Korot <ikoro...@gmail.com> wrote:
> >
> > > but on Mac I am getting the warning:
> > >
> > > "Implicit conversion loses integer precision"
> > >
> > > So my question is: how do I build my program on Mac without such
> warning
> > > and so that it will work properly.
> > >
> >
> >
> >
> http://stackoverflow.com/questions/19018209/sqlite3-error-on-compilation/19018265#19018265
> >
>
> Is this solution for .m/.mm files?
> Because I'm writing plain old C++ code with cpp extension...
>
> Thank you.
>

Someone else will have to weigh in, then. I don't know. I just saw Xcode
mentioned in your post :-X

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Query "select date(\"now\")" show EPOCH time on ARM- Coertex A15 board

2013-10-19 Thread Kevin Benson
On Sat, Oct 19, 2013 at 5:32 AM, Drake Wilson  wrote:

> Quoth jitendar kumar , on 2013-10-19 14:48:46 +0530:
> > but the same compiled with ARM - Cortex A15 cross compiler and the query
> > executed on arm board it gives the output of EPOCH time. i guess the
> > function
> > gettimeofday() fails to add the time to the default EPOCH time.
>

Have you tried _matching_ the ARM  -mcpu=cortex-a15
compilation option _exactly_ into the  -mtune  option?
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3_last_insert_rowid() problem

2013-10-19 Thread Kevin Benson
On Sat, Oct 19, 2013 at 5:46 AM, Igor Korot  wrote:

> but on Mac I am getting the warning:
>
> "Implicit conversion loses integer precision"
>
> So my question is: how do I build my program on Mac without such warning
> and so that it will work properly.
>

http://stackoverflow.com/questions/19018209/sqlite3-error-on-compilation/19018265#19018265

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Hints for the query planner

2013-09-11 Thread Kevin Benson
On Tue, Sep 10, 2013 at 3:26 PM, Richard Hipp  wrote:

>  SURVEY QUESTION:
>
> The question for today is what to call this magic hint function:
>
> (1)  unlikely(EXPR)
> (2)  selective(EXPR)
> (3)  seldom(EXPR)
> (4)  seldom_true(EXPR)
> (5)  usually_not_true(EXPR)


(6)  nominal(EXPR)

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Linq not being loaded

2013-09-09 Thread Kevin Benson
I am not familiar with the Windows System.Data.SQLite environment. The
maintainer (Joe Mistachkin) is pretty good about catching up to the users
list when he has time. Have you tried what's mentioned at the bottom of
this page?
http://www.jacopretorius.net/2011/01/using-linq-to-sql-with-sqlite.html

"Now when using your datacontext you can’t simply use a connection string,
you need to add a reference to the System.Data.SQLite dll and then create
an instance of the SQLiteConnectionString class.  If you don’t do this the
code seems to assume you’re trying to connect to a Sql Server database.



private readonly DataSource dataSource = new DataSource(new
SQLiteConnection(@"Data Source=database.db;DbLinqProvider=sqlite;"));


And that’s it!  Now you should be able to write Linq queries against your
Sqlite database just like you would with a Sql Server database."


--
   --
  --
 --Ô¿Ô--
K e V i N


On Mon, Sep 9, 2013 at 7:11 AM, Steve Palmer <swp...@gmail.com> wrote:

> Thanks, but that just confirms what I mentioned which is that
> SCOPE_IDENTITY is not valid in SQLite. The issue here is that the
> generation of SQL statements from Linq statements is not being done by
> System.Data.SQLite.Linq
> which should be generating the correct syntax.
>
> There are other examples of SQL statements being passed to sqlite via Linq
> which aren't valid. The long story made short is that there doesn't seem to
> be any support for translating Linq statements to valid Sqlite statements
> in System.Data.SQLite. For that you seem to use a third party solution.
>
> -Steve
>
>
>
> On 9 September 2013 12:00, Kevin Benson <kevin.m.ben...@gmail.com> wrote:
>
> > On Sun, Sep 8, 2013 at 2:36 AM, Steve Palmer <swp...@gmail.com> wrote:
> >
> > > Hi!
> > >
> > > Has anybody successfully used System.Data.SQLite.Linq in their project
> > and
> > > can perhaps help me with this?
> > >
> > > Even after including this DLL in my project reference, it is apparent
> > that
> > > Linq is calling the wrong provider when building the appropriate SQL
> > > statements. It is throwing an exception in SQLiteCommand with the
> > following
> > > statement:
> > >
> > > INSERT INTO [Inbox]
> > > ([Sender], [Subject], [Body], [Date], [ConversationID],
> > > [RemoteID], [ReplyTo])
> > > VALUES
> > > (@p0, @p1, @p2, @p3, @p4, @p5, @p6)
> > >
> > > SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value]
> > >
> > >  The SCOPE_IDENTITY is not valid in SQLite.
> >
> >
> >
> >
> http://stackoverflow.com/questions/304543/does-sqlite-support-scope-identity
> > --
> >--
> >   --
> >  --Ô¿Ô--
> > K e V i N
> > ___
> > sqlite-users mailing list
> > sqlite-users@sqlite.org
> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Linq not being loaded

2013-09-09 Thread Kevin Benson
On Sun, Sep 8, 2013 at 2:36 AM, Steve Palmer  wrote:

> Hi!
>
> Has anybody successfully used System.Data.SQLite.Linq in their project and
> can perhaps help me with this?
>
> Even after including this DLL in my project reference, it is apparent that
> Linq is calling the wrong provider when building the appropriate SQL
> statements. It is throwing an exception in SQLiteCommand with the following
> statement:
>
> INSERT INTO [Inbox]
> ([Sender], [Subject], [Body], [Date], [ConversationID],
> [RemoteID], [ReplyTo])
> VALUES
> (@p0, @p1, @p2, @p3, @p4, @p5, @p6)
>
> SELECT CONVERT(Int,SCOPE_IDENTITY()) AS [value]
>
>  The SCOPE_IDENTITY is not valid in SQLite.


http://stackoverflow.com/questions/304543/does-sqlite-support-scope-identity
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Query preperation time does not scale linearly with growth of no. of tables

2013-09-06 Thread Kevin Benson
On Fri, Sep 6, 2013 at 1:29 PM, Harmen de Jong - CoachR Group B.V. <
har...@coachr.com> wrote:

> On 6 sep. 2013, at 18:42, "Igor Tandetnik"  wrote:
> > If I recall correctly, query planner's behavior is worst-case quadratic
> in the number of tables participating in the query. This includes tables
> mentioned directly, and also those pulled in indirectly via views, triggers
> or foreign keys.
>
> Ok, maybe that explains it. Do you remember some topics or explanations
> that cover this more in depth? At least it will be worth for us to do some
> debugging on the SQLite code to see if we can pin point this behaviour and
> see if we can work around.



Dr. Hipp does a little bit of explaining on this topic, generally, in his
replies on this thread:

http://www.mail-archive.com/sqlite-users@sqlite.org/msg78602.html

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] please help me; i need sqlite-netFx35-setup-bundle-x64-2008-1.0.84.0.exe

2013-08-15 Thread Kevin Benson
On Thu, Aug 15, 2013 at 12:00 PM, 木与萱ip/  wrote:

> sqlite-netFx35-setup-bundle-x64
>

http://system.data.sqlite.org/downloads/1.0.84.0/sqlite-netFx35-setup-bundle-x64-2008-1.0.84.0.exe

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] float to string conversion problem

2013-06-14 Thread Kevin Benson
On Fri, Jun 14, 2013 at 6:34 PM, Filipe Madureira <
filipe.madure...@sysdevsolutions.com> wrote:

> Hi,
>
> Thanks for the great help.
> I tracked the problem to et_getdigit()
> More precisely to:
> digit = (int)*val;
>
> So, SQLite is assuming that "double" to "int" cast will truncate the
> value. This should be true.
> But in this device this is not happening, so if "val" is 2.55 I get 3 in
> "digit".
>
> Anyone knows why this could happen?
>
> I found something that makes it work correctly.
> If I call (Visual Studio C++):
> _controlfp(_RC_CHOP , _MCW_RC);
>
> it works correctly. But I am a little bit out of my league here.
> Wont this possibly cause other problems somewhere else?
> Isn't the default setting with _RC_NEAR?
> (Note: This call is thread dependent)
>
>
Possibly a bug in Win CE or ARM ?
I came across the post [1] linked below from a QT-related  forum.
Interesting to note is that each of the values (greater than 1.0) whose
digits to the right of the decimal point (fractional part) were greater
than .5 have been returned as the next larger decimal (integer part):

14.5879 has become 15.
1.6189 has become 2.
64.8874 has become 65.

However, values (less than 1.0) whose digits to the right of the decimal
point (fractional part) were greater than .5 have been returned properly:

0.7997 has become .800

[1] http://qt-project.org/forums/viewthread/25060

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Header Application-ID list

2013-06-06 Thread Kevin Benson
>
> On Thu, Jun 6, 2013 at 8:15 AM, Richard Hipp  wrote:
>
> Ideally, this content would be picked up by unix "file" command and be
> distributed to all unix systems.  However, my repeated emails to the
> maintainer Christos Zoulas about this have gone unanswered.
>
>

Sounds like it may be time to try christos  zoulas  com instead of
at astron [dot] com  ,'o)

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite-users Digest, Vol 66, Issue 3

2013-06-03 Thread Kevin Benson
On Mon, Jun 3, 2013 at 9:39 PM, YAN HONG YE  wrote:

> if i use :
> sqlite3 D:\yeyh\sqlite\mmaa.db " select
> datetime(CURRENT_TIMESTAMP,'localtime');" >mdate.html
> in dos command, it could be get the result file: mdate.html
>
> but when I use c++ to run the createprocess function, It could not create
> the mdate.html file, I don't know why?
>
>
> STARTUPINFO si;
> PROCESS_INFORMATION pi;
> si.dwFlags = STARTF_USESHOWWINDOW;
> si.wShowWindow = SW_HIDE;
> si.cb = sizeof(si);
> ZeroMemory(, sizeof(si));
> CreateProcess("sqlite3.exe", " D:\\yeyh\\sqlite\\mmaa.db  \" select
> datetime(CURRENT_TIMESTAMP,'localtime');\" >mdate.html
> ",NULL,NULL,FALSE,CREATE_NO_WINDOW,NULL,NULL,,);
> WaitForSingleObject(pi.hProcess, INFINITE);



http://stackoverflow.com/questions/7018228/how-do-i-redirect-output-to-a-file-with-createprocess

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Correct way to open multiple in memory databases

2013-05-28 Thread Kevin Benson
On Tue, May 28, 2013 at 8:31 AM, Kevin Benson <kevin.m.ben...@gmail.com>wrote:

> On Tue, May 28, 2013 at 7:57 AM, Roland Hughes <
> rhug...@cincinnati-test.com> wrote:
>
>> ":memory:" is a one-shot wonder.  The example from the documentation
>> allowed multiple threads to use the _same_ in memory database.
>>
>
>
> Am I not understanding the explanation on that page correctly? My
> understanding would be that
>
> "file:memdb1?mode=memory=shared"
>
> is aimed at a single process having access to two or more distinct but
> shareable in-memory databases.
>
> "If two or more distinct but shareable in-memory databases are needed in a
> single process, then the 
> mode=memory<http://www.sqlite.org/uri.html#coreqp>query parameter can be used 
> with a URI
> filename <http://www.sqlite.org/uri.html> to create a named in-memory
> database:"
>

Okay, I rechecked the thread and confirmed that was what Roland is seeking.
Sorry for the noise.
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Correct way to open multiple in memory databases

2013-05-28 Thread Kevin Benson
On Tue, May 28, 2013 at 7:57 AM, Roland Hughes
wrote:

> ":memory:" is a one-shot wonder.  The example from the documentation
> allowed multiple threads to use the _same_ in memory database.
>


Am I not understanding the explanation on that page correctly? My
understanding would be that

"file:memdb1?mode=memory=shared"

is aimed at a single process having access to two or more distinct but
shareable in-memory databases.

"If two or more distinct but shareable in-memory databases are needed in a
single process, then the mode=memory
query parameter can be used
with a URI
filename  to create a named in-memory
database:"
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Query optimizer bug?

2013-05-01 Thread Kevin Benson
>
> On Tue, 30 Apr 2013 12:59:17 -0400
> Richard Hipp  wrote:
>
> > http://www.sqlite.org/draft/queryplanner-ng.html
>
>
Just a "heads-up" that the  paragraph has a couple of
accidental transpositions:

*IS*

"TCP-H Q8" is a test query from the Transaction Processing Performance
Council . SQLite version 3.7.17 and earlier do
not choose a good query plan for TCP-H Q8.

*SHOULD BE*

"TPC-H Q8" is a test query from the Transaction Processing Performance
Council . SQLite version 3.7.17 and earlier do
not choose a good query plan for TPC-H Q8.

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [SQLite.Net] Right way to install precompiled binaries?

2013-04-18 Thread Kevin Benson
http://sqlite.1065341.n5.nabble.com/Newbie-issues-with-SQLite-amp-C-td65823.html

--
   --
  --
 --Ô¿Ô--
K e V i N


On Thu, Apr 18, 2013 at 9:22 AM, Gilles Ganault wrote:

> Hello,
>
> I'm having a problem getting VB Express to find SQLite .Net:
>
> 1. I went to...
> http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
> ... to download sqlite-netFx45-binary-Win32-2012-1.0.84.0.zip
>
> 2. Unzipped file in C:\Downloads\SQLite\.Net\1.0.84.0\
>
> 3. Launched VB Express 2010 to create new Windows Form project
>
> 4. Project > Add Reference: Navigated to
> "C:\Downloads\SQLite\.Net\1.0.84.0\" and pointed to
> System.Data.SQLite.dll
>
> 5. Wrote SQLite test code:
>
> Dim SQLconnect As New SQLite.SQLiteConnection()
> Dim SQLcommand As SQLiteCommand
>
> 'Note: Non-admin app cannot write to c:\
> SQLconnect.ConnectionString = "Data
> Source=c:\users\fred\test.sqlite;"
> SQLconnect.Open()
>
> 'SQLcommand = SQLconnect.CreateCommand
>
> 'SQLcommand.CommandText = "CREATE TABLE IF NOT EXISTS Item
> (type)"
> 'SQLcommand.ExecuteNonQuery()
>
> 'SQLcommand.CommandText = "INSERT INTO Item (type) VALUES
> ('something')"
> 'SQLcommand.ExecuteNonQuery()
>
> 'SQLcommand.Dispose()
> SQLconnect.Close()
>
> 6. Launched app: "Unable to load DLL 'SQLite.Interop.dll': The
> specified module could not be found. (Exception from HRESULT:
> 0x8007007E)"
>
> What is the right way to install SQLite.Net so that applications can
> find it?
>
> Thank you.
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL Logic error or missing database

2013-04-05 Thread Kevin Benson
On Fri, Apr 5, 2013 at 10:08 AM, Rob Collie  wrote:

> Yeap, I'm on Visual Studio 2012. I've created a console app:
>
>
>  sqlite3 *oDatabase;
>  int returnValue;
>  returnValue = sqlite3_open_v2("file://C:/Newfolder/testing.db",
> & oDatabase, SQLITE_OPEN_CREATE, NULL);
>  if (returnValue != SQLITE_OK )
>  {
>   //sqlite3_close(oDatabase);
>   return returnValue ;
>  }
>  int anyKey;
>  return 0;
>
> It returns 21. Checking the other project, the open actually does return 21
> too.
>


Three(3) forward slashes for the Internet path style in Windows, maybe?

file:///C:/Newfolder/testing.db
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite 3.7.16 beta

2013-03-11 Thread Kevin Benson
On Mon, Mar 11, 2013 at 11:48 AM, Richard Hipp  wrote:

>
>
> On Sat, Mar 2, 2013 at 11:29 AM, Richard Hipp  wrote:
> >
> > Please report any problems encountered.
> >
> > --
> > D. Richard Hipp
> > d...@sqlite.org


Some lunchtime reading resulted in this minutiae:

http://www.sqlite.org/draft/atomiccommit.html

S//from the one describe in this article//from the one described in this
article//

S//if a power lose or OS crash occurs//if a power loss or OS crash occurs//

S//This would make it appears as if//This would make it appear as if//

S//The idea behind a reserved locks is//The idea behind a reserved lock is//

S//takes up most the time required//takes up most of the time required//

S//described later make it appears as if//described later make it appear as
if//

S//The rollback journal exist.//The rollback journal exists.//

S//write that content back to were it//write that content back to where it//

S//where deleting a file is expense.//where deleting a file is expensive.//

S//journal is no long hot after this step.//journal is no longer hot after
this step.//

S//prevents other processes for accessing//prevents other processes from
accessing//

S//device manufactures with more control//device manufacturers with more
control//

S//during step 3.10 above//during step 3.10
above//

S//in step 3.7 is//in step 3.7 is//

S//in section 3.2 above//in section 3.2 above//

S//at step 4.2//at step
4.2


CHEERS
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Report Bugs Against SQLite

2013-03-08 Thread Kevin Benson
https://groups.google.com/forum/?fromgroups#!topic/csharp-sqlite/HQO0OwDm0kk
http://code.google.com/p/csharp-sqlite/issues/detail?id=151

--
   --
  --
 --Ô¿Ô--
K e V i N


On Thu, Mar 7, 2013 at 9:32 AM, 源子陌  wrote:

>  Hello! I'm Chinese,please forgive my poor English.Now I'm using SQLite
> for Windows Phone(Community.CsharpSqlite.WP.dll),but it doesn't work if
> selection condiction contains Chinese.For example,if the selecting sentence
> is like this:
> select * from nearplace where city1="西安“
> it will show this picture:
>
> Could please tell me how to solve it?Thanks a lot!
>
> My best wishes.
>  Crytoll
> 2013.3.7
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Bullzip ms Access to MySql

2013-03-06 Thread Kevin Benson
On Wed, Mar 6, 2013 at 4:36 PM,  wrote:

>
> Hi,
>
>

> *SNIP



>

one more thing, is there a way to search through the archived forums?
>
> Vance
>


Here's one way:

http://www.mail-archive.com/search?a=1=sqlite-users@sqlite.org=1d==datenewest=Search
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Informal question

2013-03-02 Thread Kevin Benson
On Sat, Mar 2, 2013 at 11:37 AM, Simon Slavin  wrote:

> Although there are many hobbyist programmers here, many of us are clearly
> using SQLite for our serious day jobs, and not just for playing with.  So
> why is this list busy over the weekends rather than during the working week
> ?
>
> Simon.
>

Paraphrasing Lewis Carroll ...The hurrier we go, the behinder we get !
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] "SQLite" Pronunciation

2013-02-27 Thread Kevin Benson
http://www.youtube.com/watch?v=jN_YdMdjVpU
--
   --
  --
 --Ô¿Ô--
K e V i N


On Wed, Feb 27, 2013 at 6:28 PM,  wrote:

> OK, how does one pronounce "SQLite"? "see-kwel-lite"? "ess-kyoo-lite"?
> "ess-kyoo-ell-lite"? "see-kwel-ite"? "ess-kyoo-ell-ite"? Or...?
>
> I guess, to some extent, it may depend on whether one pronounces (or
> mispronounces) "SQL" as "see-kwel" or as "ess-kyoo-ell".
>
> I think I read someplace that the author of SQLite pronounced it as
> "ess-kyoo-ell-ite". (?) I couldn't find any pronunciation mentioned on
> sqlite.org.
>
> Is there a consensus here? (Yes, I know that pronunciation matters little
> on a mailing list.)
>
> Gee, "see-plus-plus", "emm-eff-see", and "boost" (etc.) are all a lot
> easier (to pronounce, anyway - ).
>
> Fred
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [SQLite.ADO.Net] Upgrading XP to SQLite version?

2013-02-26 Thread Kevin Benson
On Tue, Feb 26, 2013 at 5:37 PM, Gilles Ganault <gilles.gana...@free.fr>wrote:

> On Tue, 26 Feb 2013 13:09:10 -0500, Kevin Benson
> < kevin.m.ben...@gmail.com> wrote:
> > Because there are actually a number of different ways the (CLR)untime
> > locates assemblies, I ~believe~ the FAQ only attempts to offer a general
> > advisement about the "Externals" folder as a *HINT*. The rest is up to
> the
> > programmer.
>
> Thanks for the link to MSDN, but it doesn't mention \Externals, so the
> application won't find the other DLL since it's neither in the
> application directory nor in the PATH.
>


The directory doesn't *HAVE* to be called ...\Externals. You pick the name,
any name, and then tell Visual Studio, that is all ;-)
The FAQ is just illustrating with a "semantic" name example ...that the
folder(s) would represent "where you store" any/all external files
associated with your project/solution. I ~believe~ the histrionics of
Visual Studio C++ discussions reference /Externals, so that example
name likely originates somewhere back in time and actual usage.
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [SQLite.ADO.Net] Upgrading XP to SQLite version?

2013-02-26 Thread Kevin Benson
On Tue, Feb 26, 2013 at 11:34 AM, Gilles Ganault wrote:

> Next, just to check, I reinstalled a fresh Windows7 + VS Express 201
> to try the "Precompiled binaries no bundle" this time.
>
> Even with the VC++ 2012 runtime, it still complained about
> "SQLite.Interop.dll : The specified module could not be found".
>
> Turns out the wiki is half-wrong: When using the "no bundle" package,
> instead of using some "Externals" sub-directory,  it must be unpacked
> in either the Debug\Release directory or some location that's part of
> the PATH.


Because there are actually a number of different ways the (CLR)untime
locates assemblies, I ~believe~ the FAQ only attempts to offer a general
advisement about the "Externals" folder as a *HINT*. The rest is up to the
programmer.

http://msdn.microsoft.com/en-us/library/yx7xezcf(v=vs.110).aspx

You most likely would be fine with using the privatePath attribute of the
  element:

http://msdn.microsoft.com/en-us/library/823z9h8w.aspx

in your app.config file in the 


Cheers,
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] [SQLite.ADO.Net] Upgrading XP to SQLite version?

2013-02-26 Thread Kevin Benson
On Tue, Feb 26, 2013 at 3:43 AM, Gilles Ganault wrote:

> I'll uninstall the one from Phoenix Software Solutions, but I'm
> puzzled at which package to install from here:
>
> http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
>

http://system.data.sqlite.org/index.html/doc/trunk/www/faq.wiki


>
> Which package should I use for...
> - a development host
>

*(8) How do I install System.Data.SQLite on a development machine?*

Strictly speaking, there is no need to install System.Data.SQLite on any
development machine (e.g. via the setup). The recommended way to use the
assemblies is:


   - Download the precompiled binary package for your target framework and
   processor architecture (e.g. 32-bit x86, .NET Framework 2.0).


   - Extract the package to a directory named "Externals" inside your
   project directory.


   - Add a reference to the "System.Data.SQLite" assembly from the
   "Externals" directory.


   - If necessary (i.e. you require LINQ support), also add a reference to
   the "System.Data.SQLite.Linq" assembly from the "Externals" directory.

Alternatively, when using Visual Studio 2010 or later, you can simply use
the NuGet package that corresponds to your target processor architecture.
Installing the assemblies into the Global Assembly Cache is not recommended
as it may cause conflicts with other applications installed on the machine.


> - a user host
> ?
>

*(9) How do I install System.Data.SQLite on end-user machines?*

Strictly speaking, there is no need to install System.Data.SQLite on any
end-user machine (e.g. via the setup). The recommended way to deploy the
assemblies is "application local" (i.e. copy them to the directory the
application is installed to). Installing the assemblies into the Global
Assembly Cache is not recommended as it may cause conflicts with other
applications installed on the machine.

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Unable to use table alias inside parenthesis on right side of join

2013-01-31 Thread Kevin Benson
I wonder if this earlier mention is related?

http://osdir.com/ml/sqlite-users/2012-07/msg00054.html
--
   --
  --
 --Ô¿Ô--
K e V i N


On Thu, Jan 31, 2013 at 12:04 PM, Ryan Johnson
wrote:

> Hi all,
>
> Strange one here... consider the following schema:
>
> R(a,b)
> S(b,c)
>
> These queries all work fine:
>
> select R1.* from R R1 join S S1 using(b);
> select S1.* from R R1 join S S1 using(b);
> select R1.* from (R R1 join S S1 using(b));
> select S1.* from (R R1 join S S1 using(b));
> select R1.* from (R R1 join S1 using(b)) join (R R2 join S2 using(b))
> using (a,c);
> select S1.* from (R R1 join S1 using(b)) join (R R2 join S2 using(b))
> using (a,c);
>
> But these two do not:
>
> select R2.* from (R R1 join S S1 using(b)) join (R R2 join S S2 using(b))
> using (a,c);
>
>> Error: no such table: R2
>>
> select S2.* from (R R1 join S S1 using(b)) join (R R2 join S S2 using(b))
> using (a,c);
>
>> Error: no such table: S2
>>
>
> Why are R1/S1 aliases visible at top level but R2/S2 aren't? It seems that
> if the parentheses made those joined pairs into nested queries, then R1/S1
> should be lost; if parentheses are only for grouping, then R2/S2 should be
> visible.  Either way, something seems a bit off.
>
> The official syntax diagrams [1] suggest that parentheses imply only
> grouping in this context. Then again, they also suggest it should be a
> syntax error for a table alias to follow a join source in parentheses...
> and that actually works fine, other than making the inner table aliases
> unavailable (which kind of makes sense):
>
> select J1.* from (R R1 join S S1 using(b)) J1 join (R R2 join S S2
> using(b)) J2 using (a,c);
> select J2.* from (R R1 join S S1 using(b)) J1 join (R R2 join S S2
> using(b)) J2 using (a,c);
> select R1.* from (R R1 join S S1 using(b)) J1 join (R R2 join S S2
> using(b)) J2 using (a,c);
>
>> Error: no such table: R1
>>
>
> And yes, I've since ditched the USING syntax and gone back to WHERE
> clauses, though the resulting is 20% longer and arguably much less clear
> [2]:
>
> select R1.*, R2.* from (R R1 join S using(b)) join (R R2 join S using(b))
> using(a,c) where R1.b != R2.b
> select R1.*, R2.* from R R1, R R2, S S1, S S2 where R1.b=S1.b and
> R2.b=S2.b and R1.a=R2.a and S1.c=S2.c and R1.b != R2.b
>
> [1] 
> http://www.sqlite.org/**syntaxdiagrams.html#join-**source
>
> [2] Note that I added a predicate in, which I had stripped from the
> earlier test cases for clarity
>
> Thoughts?
> Ryan
>
> __**_
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-**bin/mailman/listinfo/sqlite-**users
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FTS problem with 'NOT term' queries

2013-01-29 Thread Kevin Benson
The explanation right above that table of examples contains these important
(I believe) phrases:

...BINARY SET operators...
...TWO operands to an operator...

(emphasis mine)
On Tue, Jan 29, 2013 at 11:30 PM, Alexey Pechnikov
wrote:

> SELECT * FROM docs WHERE docs MATCH 'NOT




--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] parameters in a view, disallowed? (docs issue)

2012-12-21 Thread Kevin Benson
On Fri, Dec 21, 2012 at 12:53 AM, Larry Brasfield  wrote:

> On 12/20/2012 4:10 PM, Larry Brasfield wrote:
>> > Igor Tandetnik wrote:
>>  [regarding where parameters allowed, "where literals are"]
>> >> >
>> >> > How did you discern this?
>> >>
>> >> I know from experience where parameters work (SELECT, INSERT and
>> >> similar; also ATTACH as one of my projects happens to use it this way),
>> >> and where they don't (all forms of CREATE; I haven't tried ALTER but
>> I'm
>> >> 99% sure it won't work there either). I've just tested PRAGMA. I
>> briefly
>> >> scanned the rest at http://sqlite.org/lang.html to confirm that their
>> >> syntax doesn't involve expressions.
>> >
>> > I do not mean to be argumentative here, but I think the documentation on
>> > this leads to a different result.  If you examine the syntax diagram for
>> > "create view"
>>
>> Why should I? I never made any claim about CREATE VIEW's syntax. In my
>> explanation, "All forms of CREATE", which includes CREATE VIEW, fall
>> under "know from experience" bucket, not "syntax doesn't involve
>> expressions" bucket.
>>
>
> You assert (believably) that SQLite has not allowed parameters in views
> for awhile, and that you know this from experience rather than the
> documentation.  I assert (without refutation) that the documentation
> clearly allows parameters in a view.  We have no disagreement, but it does
> appear that SQLite's operation differs from what its documentation clearly
> implies.  Hence my revision of the topic.
>
> I will not suggest that you should be interested in this discrepancy, but
> others might be.
>
> Best regards,
>

At least, there's this:

http://sqlite.org/docsrc/info/7276f4a4a3e338ea187cb5e50c57e4f9806aed89?sbs=0

+ERROR_MSG {parameters are not allowed in views} {
+  The right-hand side of a CREATE VIEW (that is to say,
+  the SELECT statement that defines the view) may not contain
+  bound parameter names like "?", "?123", ":term", "@xyz", or "$var".
+}

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Simple SQLite-based spreadsheet?

2012-12-07 Thread Kevin Benson
On Fri, Dec 7, 2012 at 7:04 AM, Gilles Ganault wrote:

> Hello
>
> I need to enter a bunch of items into a table that I can later read
> from a web app.
>
> I was wondering if someone had come up with a Windows application that
> would...
> - use Sqliteto host the data
> - make it very easy to add a table anc columns (possibly several
> related tables)
> - display a spreadsheet to make it easy to add data
> ?
>
> Namely, a basic, no brainer MS Access relying on SQLite. Considering
> so many people use Excel as poor man's database because anyone can use
> it while Access takes some learning... I think there's an opportunity
> here.
>
> Thank you.
>

http://sqliteforexcel.codeplex.com/

This project, *SQLite for Excel*, is a lightweight wrapper to give access
to the SQLite3 library from VBA. It provides a high-performance path to the
SQLite3 API functions, preserving the semantics of the SQLite3 library
calls and allowing access to the distributed SQLite3.dll without
recompilation.

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite converts all unicode characters into ANSI

2012-11-19 Thread Kevin Benson
On Sun, Nov 18, 2012 at 8:57 PM, ZikO  wrote:

> Hello,
> thanks for your answers.
>
> I downloaded both precompiled binaries and shell for windows from
> www.sqlite.org.
>
> The script looks like this:
> CREATE TABLE IF NOT EXISTS imiona (
> id INTEGER PRIMARY KEY,
> data TEXT,
> imie1 TEXT,
> imie2 TEXT,
> imie3 TEXT);
>
> INSERT INTO imiona (data,imie1,imie2,imie3) VALUES
> ('01/01/2012','Masława','Mieczysława','Mieszka'),
> ('16/01/2012','Marcelego','Walerii','Włodzimierza'),
> ('17/09/2012','Franciszka','Lamberty','Narcyza');
>
>
> As you can see, it contains accents. The script was written in Notepad++
> that controls which charset coding is used but I also double checked it in
> Notepad and it indicated UTF-8; it can also be confirmed by reading the
> script text file in Hex editor that shows BOM at the beginning:
> [*ef bb bf* 43 52 45 41 54 45 20 54 41 42 4c 45 20] [CREATE TABLE]
>
> The sequence at start 0xEF, 0xBB, 0xBF confirms the file has been created
> using UTF-8. I tested copy / paste between two text editors in windows 7
> and
> everything works ok; texts with accents are copy / pasted without losing
> accents. I have noticed though that when I used command line I got this
> error:
>
> D:\Wydarzenia\Events>sqlite3 imieniny.db < test.sql
> Error: near line 1: near "´╗┐CREATE": syntax error
>
> I then used the conding UTF-8 without BOM and the command was accepted but
> unfortunately I get the strange result:
> sqlite> select * from imiona;
> 1   01/01/2012  MasławaMieczysława  Mieszka
> 2   16/01/2012  Marcelego   Walerii   Włodzimie
> 3   17/09/2012  Franciszka  Lamberty  Narcyza
> 4   01/01/2012  MasławaMieczysława  Mieszka
> 5   16/01/2012  Marcelego   Walerii   Włodzimie
> 6   17/09/2012  Franciszka  Lamberty  Narcyza
>
> Now, I don't know how to test if the text is OK because SQLite2009Pro
> displays everything converted to ANSI even ithough I set it to UTF-8 :/
> Perhaps this program is not very good then. What would you recommend,
> instead?
>
> once again thanks for your effort towards this. I am really really
> surprised
> this behaviour.
>
>
I suspect your problem is not with the importer (sqlite3.exe), but instead
with the exporter (cmd.exe). See here:
http://stackoverflow.com/questions/1259084/what-encoding-code-page-is-cmd-exe-using

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Seemingly random Access violation errors

2012-10-11 Thread Kevin Benson
On Thu, Oct 11, 2012 at 6:07 AM, Joe Mistachkin wrote:

>
> Matthew Dumbleton wrote:
> >
> > I have managed to get hold of a HTC HD2 device to do testing on and have
> > unfortunately found the error still occurs using the small test
> application
> > I sent you a while back.
> >
>
> Looking at your sample code again, the use of Thread.Abort could be causing
> problems. Here is some additional information on this:
>
>
> http://stackoverflow.com/questions/421389/is-this-thread-abort-normal-and-sa
> fe
>
> This does not directly explain the access violation; however, it is
> something
> to think about.
>
> --
> Joe Mistachkin
>

Another informative explanation resource:

http://www.albahari.com/threading/part4.aspx#_Aborting_Threads
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Seemingly random Access violation errors (resent)

2012-10-08 Thread Kevin Benson
On Mon, Oct 8, 2012 at 12:32 PM, Matthew Dumbleton wrote:

>
> Thanks Kevin.
> I will see if I can find some sort of registry hack or something to
> disable this and see if it makes any difference.
>

Actually, you might investigate how to access the RTLog Manager to examine
the log(s) and see what it might reveal ( after all, it appears as if it
might be for debugging situations just like your experiencing ;-)
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Seemingly random Access violation errors (resent)

2012-10-08 Thread Kevin Benson
On Mon, Oct 8, 2012 at 11:57 AM, Matthew Dumbleton wrote:

> Joe,
>
> > It's worked on every device that I've used in the past.
>
> I hope you see the funny side when I say, this doesn't fill me with a
> great amount of confidence as according to your previous messages you don't
> have a device to test on, only emulators. :)
>
>
> > I have no idea what the "rtlogshimeng" DLL is. I tried searching for
> > references to it on the web to no avail. It might be totally harmless;
> > however, it seems to be implicated by the debug output.
>
> I have no doubt that the dll is harmless as even with a complete reflash
> of the device it exists. My guess would be that it is a Motorola
> device-specific library since we cannot find any reference to it and given
> your comment above (despite my tongue in cheek response.)
> Still the fact that the problem occurs between another threads
> sqlite3_finalize() calls and that calling GC.Collect before making a
> database connection seems to hide the issue doesn't suggest that SQLite is
> completely exonerated.
>
> > Does everything work properly when only a single thread is used?The
> answer is, no if the only thread doing the database accessing is not the
> foreground (UI) thread. If you mean, there is literally just a UI thread
> making database connections in amongst user activity, then (I need to do
> more testing but) certainly the issue becomes a lot less easy to recreate
> (i.e. in the small amount of time I've had to test it has not reoccured in
> those conditions). Unfortunately the app I had in mind requires more than a
> single thread even if only one thread can access the database at once.
>
> Please do not interpret my disappointment as criticism, it is more of a
> compliment to SQLite that I am so frustrated that I will not be able to
> take advantage of it.
>
> Thank you again for all your help, it was and is greatly appreciated. At
> least now I know.
>

Having seen your mention of Motorola confirms my web search bringing up
Motorola's Debug Tool known as RT Logs (Retail Tools - system driver
logs).My guess is that the "rtlogshimeng" DLL reference is related to their
tool:

http://goo.gl/sF4hU


--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Seemingly random Access violation errors (resent)

2012-10-08 Thread Kevin Benson
On Mon, Oct 8, 2012 at 10:54 AM, Matthew Dumbleton wrote:

> So does this mean therefore SQLite will not currently work on a compact
> framework device? (Or at least not on mine.)
> There's nothing else installed or running apart from the test app I sent
> you using SQLite and the OS itself. That dll is protected inside the
> windows directory on the device so I cannot even
> try removing/renaming it.
> Since the device isn't crashing on it's own it's presumably some sort of
> inadvertant call being made as part of the application running, which
> disappears when SQLite is not referenced.
> And since Microsoft aren't likely to release any updates to the compact
> framework I'm not sure where to go with this.
>
> > From: sql...@mistachkin.com
> > To: sqlite-users@sqlite.org
> > Date: Mon, 8 Oct 2012 06:00:50 -0700
> > Subject: Re: [sqlite] Seemingly random Access violation errors (resent)
> >
> >
> > Matthew Dumbleton wrote:
> > >
> > > Sorry about that. Sent you the attachments properly a while ago and
> have
> > > also just sent you a .txt file with the last output from the debugger
> > > before the access violation crash thanks to your new version.
> > >
> >
> > The start of the trouble seems to be here:
> >
> > Data Abort: Thread=8aeec800 Proc=81a374c0 'SQLiteDatabaseEngineTest.exe'
> > AKY=00010001 PC=7b38a890(netcfagl3_5.dll+0xd890)
> > RA=7b38a7d0(netcfagl3_5.dll+0xd7d0) BVA=1100 FSR=0005
> > #$# Exception 0xC005 
> > #$# Thread procedure: rtlogshimeng.dll!0x000744C8 (in dll)
> > #$# PC: netcfagl3_5.dll!0xD890 (in dll)
> > #$# Return address: netcfagl3_5.dll!0xD7D0 (in dll)
> > #$# Call stack top
> >
> > This exception appears to be coming from the .NET Compact Framework
> itself
> > on a thread calling into the rtlogshimeng DLL (I'm not sure what this DLL
> > is for).
> >
> > Later on in the debugger output, I see:
> >
> > *** ASSERTION FAILED in ../core/sqlite3.c(15799):
> > pInt[nReserve/sizeof(int)]==(int)0xE4676B53
> >
> > This type of assertion failure indicates generalized heap corruption.
> > After this, nothing in the heap can truly be trusted.
> >
> > --
> > Joe Mistachkin


Are you having this problem with a Motorola device?
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] export html error

2012-09-21 Thread Kevin Benson
On Fri, Sep 21, 2012 at 4:30 AM, YAN HONG YE  wrote:

> C:\t9>sqlite3 -html -header t9_engine.db "select id,partnumber,'img
> src=
> t'||pic||'height=120px',pcs from engine where id>7 " >> n.html
>

C:\t9>sqlite3 -html -header t9_engine.db "select id,partnumber,'img
src='||pic||'height=120px',pcs from engine where id>7 " >>
n.html
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 1.0.76 Version

2012-09-15 Thread Kevin Benson
On Sat, Sep 15, 2012 at 2:32 PM,  wrote:

> Hi,
>
> Please i need sqlite-netFx40-setup-bundle-**x64-2010-1.0.76.0.exe. Does
> anyone have it in his archive?
>
> Regards,
>
> Tope.


The SQLite downloads wiki is conveniently set up with file URLs that allow
for direct substitution of earlier versions (back to a point).

Current comparable download:

http://system.data.sqlite.org/downloads/1.0.82.0/sqlite-netFx40-setup-bundle-x64-2010-1.0.82.0.exe

Archived comparable download

http://system.data.sqlite.org/downloads/1.0.76.0/sqlite-netFx40-setup-bundle-x64-2010-1.0.76.0.exe

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] about sqlite3_create_function

2012-08-30 Thread Kevin Benson
Thgat should have been "...the file func.c."
--
   --
  --
 --Ô¿Ô--
K e V i N


On Thu, Aug 30, 2012 at 11:10 PM, Kevin Benson <kevin.m.ben...@gmail.com>wrote:

> the file*func.c*."
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] about sqlite3_create_function

2012-08-30 Thread Kevin Benson
On Thu, Aug 30, 2012 at 10:25 PM, YAN HONG YE  wrote:

> who give me a sample about function sqlite3_create_function,I can't search
> by google.
> thank you!
> sqlite3_create_function(db, "hello_newman", 0, SQLITE_UTF8, 0,
> hello_newman, 0, 0);
> ___
>

http://www.sqlite.org/c_interface.html

" For additional information and examples on how to create new SQL
functions, review the SQLite source code in the file*func.c*."
--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Import at first unhappy - then happy after all

2012-08-26 Thread Kevin Benson
On Sun, Aug 26, 2012 at 11:30 AM, Udi Karni  wrote:

> The following scenario happens occasionally.
>
> At first the import fails on mismatched columns - as if the "end-of-line"
> marker is off.
>
> You run it again right away and everything completes successfully.
>
> ?
>
> Is there some kind of tracing that can be turned on so that when this
> happens we can gather some clues?
>
> As an aside - not a big deal - this is on Windows - the file specifications
> in the ".import" and ".read" commands require 2 back slashes in the syntax
> - can that be fixed?
>
> Thanks !
>

Perhaps
http://www.sqlite.org/uri.html  3.1 The URI Path
will help you

--
   --
  --
 --Ô¿Ô--
K e V i N



>
> Z:\>sqlite3 z:\xyz.db3
> SQLite version 3.7.11 2012-03-20 11:35:50
> Enter ".help" for instructions
> Enter SQL statements terminated with a ";"
> sqlite> pragma page_size=4096;
> sqlite> pragma journal_mode=off;
> off
> sqlite> pragma temp_store=memory;
> sqlite> .timer on
> sqlite> .separator ','
> sqlite> .read c:\\create_table\\create_table_xyz.sql
> CPU Time: user 0.00 sys 0.00
> sqlite> .import c:\\data_csv\\xyz.csv xyz
> Error: c:\data_csv\xyz.csv line 12: expected 59 columns of data but found
> 99
> sqlite> select count (*) from xyz;
> 0
> CPU Time: user 0.00 sys 0.00
> sqlite> .import c:\\data_csv\\xyz.csv xyz
> sqlite> select count (*) from xyz;
> 97744059
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Import at first unhappy - then happy after all

2012-08-26 Thread Kevin Benson
 On Sun, Aug 26, 2012 at 11:30 AM, Udi Karni  wrote:

***SNIP***


>
> As an aside - not a big deal - this is on Windows - the file specifications
> in the ".import" and ".read" commands require 2 back slashes in the syntax
> - can that be fixed?
>
> Thanks !
>
>
The explanation for this behavior is here

http://www.sqlite.org/cvstrac/tktview?tn=1073
--
   --
 --
   --Ô¿Ô--
  K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite support on windows

2012-08-26 Thread Kevin Benson
 On Sun, Aug 26, 2012 at 9:23 AM, Arbol One  wrote:

> [Quote]
> *There are a number of devices that run Windows CE
> 
> That is the vortex in this issue.
>
> The app is being developed on Win7. Using C++ and Gtkmm as the GUI toolkit,
> the libraries used for manipulation and storage of data is 'home cooked',
> with the exception of the SQLite3 library. From the inception of the
> project, the development has always been with the intention of portability,
> thus, it is assumed that if the device can run C/C++ applications it will
> be
> able to run our application as well.
>
> Going back to the question of the 'number of devices' that you mentioned...
> where could I find a list of these number of devices? Does Microsoft has
> one?
>
> TIA
>

http://pdadb.net/index.php?m=os
--
   --
 --
   --Ô¿Ô--
  K e V i N


>
> -Original Message-
> From: Mohit Sindhwani [mailto:m...@onghu.com]
> Sent: Sunday, August 26, 2012 1:13 AM
> To: General Discussion of SQLite Database
> Cc: Arbol One
> Subject: Re: [sqlite] SQLite support on windows
>
> On 26/8/2012 12:30 PM, Arbol One wrote:
> > I am glad someone asked this question, we are almost finish with a
> > small application that is best suited for a hand held device. Is there
> > a device anyone here could suggest?
> > As I said, the application is very small and uses SQLite as its RDB.
> > The application resembles a questionnaire... fill in the blanks kind
> > of thing, the data collected goes in to the RDB and later on downloaded
> to
> a pc.
> >
> > TIA
>
> What kind of device are you looking for?  A lot also depends on what
> platform your application is built for, and what it needs.  Your current
> description tends to suggest that it's rather well suited as an app for any
> (or many) of the mobile phones.  There are a number of devices that run
> Windows CE and you can compile SQLite3 with Visual Studio for those
> devices.
>
> Best Regards,
> Mohit.
> 26/8/2012 | 1:11 PM.
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to connect to an in-memory, shared cache db via SQLiteConnection

2012-08-17 Thread Kevin Benson
On Fri, Aug 17, 2012 at 8:51 PM, Wayne Bradney wrote:

>
>
>
> I'm using System.Data.SQLite version 1.0.81.0, and I'm trying the
> following connection string: FullUri='file::memory:?cache=shared; when I
> Open() the SQLiteConnection, I get: Invalid ConnectionString format for
> parameter "FullUri" What am I doing wrong?
> ___
>

http://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki


*Version History*

*1.0.82.0 - September XX, 2012 (release scheduled)*

Add support for URI file names  via the new
FullUri connection string property.


> --
>--
>   --
>  --Ô¿Ô--
> K e V i N
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite Shell Bug, Ignores Separators in Quotes Sometimes When Importing Data

2012-07-23 Thread Kevin Benson
On Mon, Jul 23, 2012 at 12:05 PM, Richard Hipp  wrote:

> On Mon, Jul 23, 2012 at 8:37 AM, Hayes, Michael - IS <
> michael.ha...@exelisinc.com> wrote:
>
> >
> > The documentation says that the separator will be honored even inside of
> > quotes.   ("The SQLite shell will always split fields on the separator
> > character, no matter what comes before or after it. Quotes or backslashes
> > won't escape them.).
>
>
> I'm not able to find this statement anywhere in the SQLite documentation.
> Can you send a link?
>
> --


He's quoted from the wiki:
 http://www.sqlite.org/cvstrac/wiki?p=ImportingFiles

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Error indicated through SQLITE_CONFIG_LOG callback but sqlite3_step() does not fail

2012-06-29 Thread Kevin Benson
On Fri, Jun 29, 2012 at 3:26 PM, Jeff Archer  wrote:

> I have been puzzling on this for a couple of days now and am at a loss.  I
> hate to let something like this go because it appears so much like an
> error, I feel like it will just bite me at a later time.
>
> Any suggestions would be greatly appreciated.
>
> In attempting to execute the following SQL: "INSERT INTO [Scans](ScanID,
> Timestamp, EndTime, Result) VALUES(NULL, @Timestamp, @Timestamp, @Result);"
>
> I get the following message through the SQLITE_CONFIG_LOG callback during
> the sqlite3_step():
> errcode: SQLITE_SCHEMA  (17)
> message: statement aborts at 80: [INSERT INTO [Scans](ScanID, Timestamp,
> EndTime, Result) VALUES(NULL, Timestamp, @Timestamp, @Result);] database
> schema has changed
>
> sqlite3_step() returns SQLITE_DONE (101) and the row being inserted does
> get inserted into the database.
>
> I have investigated this with a very small test app and have not seen the
> log message in this context.
>
> I have now instrumented my real applications with output of all SQL to a
> single log file but am not seeing anything in here that would suggest the
> schema is being changed.  (I'm not sure how to make this available since it
> can't be attached to this email)
>
> Unfortunately, I am on Windows and using the amalgamation (3.7.13) in
> VisualStudio so I am handicapped in terms of debugging down to the actual
> line within sqlite.  I only see one instance of this log message at line
> 72025 within sqlite3VdbeExec().
>

The mention of SQLITE_SCHEMA error and sqlite3VdbeExec() sounds like maybe
you're fighting an expired statement??? Maybe the virtual machine opcodes
will help:

http://www.sqlite.org/opcode.html

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] order by clause should come after union not before

2012-06-15 Thread Kevin Benson
On Fri, Jun 15, 2012 at 5:56 AM, YAN HONG YE  wrote:
>
> select *  from hbc order by cmc desc limit 10
> union
> select * from hbc where qph>0
> union
> select * from hbc where hctl=1
>
> this sql cmd cause the error:
> order by clause should come after union not before
>

http://www.sqlite.org/lang_select.html

ORDER BY and LIMIT clauses may only occur at the end of the entire compound
SELECT.

--
  --
 --
--Ô¿Ô--
   K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] FTS Example Fails (matchinfo arguments)

2012-06-14 Thread Kevin Benson
On Thu, Jun 14, 2012 at 4:27 PM, Kees Nuyt  wrote:

> On Thu, 14 Jun 2012 13:13:58 -0700, Sergei G 
> wrote:
>
> >Is there a way I can obtain documentation that matches my version?
> >Online documentation is for the most current version.
> >I have found that both my hosting provider and debian stable are a bit
> >behind, so I have to work with what I've got.
> >
> >
> >Thanks
>
> Part of the documentation is partly generated from the sqlite source
> code maintained in the fossil [1] source repository.
> The remainder is kept in a separate source repository.
>
>
> You can check out any point on the timelines of both repositories.
>
> Links are at the bottom of :
> http://www.sqlite.org/download.html
>
>
> [1] http://www.fossil-scm.org/
>
> --
> Regards,
>
> Kees Nuyt
>


 And, of course, there's also the Internet Archive:

http://wayback.archive.org/web/*/http://www.sqlite.org

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Specifying a nullable column

2012-06-11 Thread Kevin Benson
On Mon, Jun 11, 2012 at 10:35 AM, Paul Medynski  wrote:

> Hi folks,
>
> I notice that the syntax diagram for 'create table' shows the
> 'column-constraint' definition as requiring 'null' to always be preceded by
> 'not'.  I don't see any definition that supports just 'null'.  However,
> when using SQLite3 3.7.3 or 3.7.9, I can create a table and specify any
> column as "Foo  null", and it works as expected allowing the column
> to contain null values.
>
> Is the syntax diagram simply out of date, or am I doing something that
> appears to work, but will bite me in the end? :)
>
http://www.sqlite.org/draft/lang_createtable.html

"A CREATE TABLE command specifies the following attributes of the new table:
-
-
-
-
- A default value or expression for each column in the table.
-
-
- A set of SQL constraints for each table. SQLite supports UNIQUE, NOT
NULL, CHECK and FOREIGN KEY constraints."

"A table created using CREATE TABLE AS has no PRIMARY KEY and no
constraints of any kind. The default value of each column is NULL."

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Question about the SQLITE_API

2012-06-08 Thread Kevin Benson
On Thu, Jun 7, 2012 at 11:05 PM, 天牙  wrote:

> First, thanks for adding me to this mailing list. Here I want to ask a
> question about the SQLITE_API. When i was running the ios programe use the
> sqlite3 database , it said that " unknown type ‘SQLITE_API’". Thank you for
> telling me what is the reason caused this problem.
>

When you are importing the header file, in order to use the quoted form of
the header filename (for example #include "pathto/sqlite3.h") for local
includes of files, you most likely need to specify the relative path from
the current file. Otherwise, use the angle-bracket form of the header
filename (for example #include ) for global includes where the
header file can be found somewhere on the include path passed to the
compiler.

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite3.dll for OS x64

2012-06-06 Thread Kevin Benson
On Wed, Jun 6, 2012 at 8:33 AM, NOCaut  wrote:

> In the offical site i have not found dll for x64 OS. Where can I download
> it?
>
> --
>
 Maybe try downloading the .ZIP archive for the appropriate .NET Framework
(with "-static-binary-bundle-x64-" as part of its archive name - under
"Precompiled Statically-Linked Binaries for 64-bit Windows") and then
rename the file "System.Data.SQLite.dll" to "SQLite3.dl​l" ???

http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] how to?

2012-06-05 Thread Kevin Benson
On Tue, Jun 5, 2012 at 12:43 PM, Jonas Malaco Filho <
jonasmalacofi...@gmail.com> wrote:

> I think that session info is stored in sessionrestore.js, in your Firefox
> profile data folder. There is also a sessionrestore.bak, that may help you.
> You can check if you have other (older) versions of these files thanks to
> shadowing (or any other recovery methods).
>
> *Jonas Malaco Filho*
>
http://support.mozilla.org/en-US/questions/927930#answer-335629
--
   --
  --
 --Ô¿Ô--
K e V i N

>
> 2012/6/5 Simon Slavin 
>
> >
> > On 5 Jun 2012, at 12:26pm, baboushka jane 
> wrote:
> >
> > > i hope i have found the right place. i would like some help with my
> > sqlite files.
> > > a week or so back i was clearing my recent Firefox history when my
> > browser froze and so i used Activity Monitor to force close Firefox.
> > meanwhile, i was reading an e-mail and clicked on a link which opened up
> a
> > new session.. meaning, i could not retrieve my last session - i.e. the
> > countless tabs that i had open when i force closed..
> > > after a little googling, i think i gather that this last session is
> > somewhere in a sqlite file on my HD.
> > > i had some really valuable reading lined up that i unfortunately didn't
> > bookmark in time.. thank you so much in advance!
> >
> > Sorry, but you need an expert in FireFox, not one in SQLite.  Try asking
> > on one of the FireFox support lists.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Cascade deletes in .Net FW 4 + EF

2012-05-29 Thread Kevin Benson
On Tue, May 29, 2012 at 9:26 AM, Peter Litsegård wrote:

> Hi!
>
> I have a very simple database hsoted by SQLite v1.0.80.0. I'm struggling
> to get cascade deletes to work using EF. I have set the OnDelete to
> 'Cascade' on the "one end" but it fails to execute. Is this a known issue?
> Are there any workarounds?
>
> Thanks!
> ___
>
 A quick search seems to indicate you need to either:

explicitly ensure execution of the PRAGMA foreign_keys = true command
...before attempting such a transaction
-OR-
append the connection string attribute as implemented here, maybe?
http://system.data.sqlite.org/index.html/tktview?name=464e6cee2f

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What does "The use of the amalgamation is recommended for all applications." mean, precisely?

2012-05-26 Thread Kevin Benson
On Fri, May 25, 2012 at 8:08 PM, Jonas Malaco Filho <
jonasmalacofi...@gmail.com> wrote:

> Just curious, what dev language are you using?
>

I ~believe~ he's using LiveCode:
http://www.runrev.com/products/livecode/livecode-platform-overview/

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite-users Digest, Vol 53, Issue 9

2012-05-09 Thread Kevin Benson
On Wed, May 9, 2012 at 9:28 PM, YAN HONG YE  wrote:

> On  Wed, 9 May 2012 02:24:58 +0100
> Simon Slavin  wrote:
>
> > alter table myref add stkcode varchar(30);
> > update myref set stkcode = dzhhq.stkcode;
> >
> > this sql command couldn't run in my sqlite.
>
> It does not know which row from the table dzhhq it is meant to use.
>
> Simon.
>
> I means:
> use another table column, to update the current table column: like this:
> alter table myref add upfu;
> update myref set upfu =dzhhq.upfu where exists (select * from dzhhq where
> myref.stkname=dzhhq.stkname);
>
> but it said no such column: dzhhq.upfu
> but dzhhq.upfu really exist.
> ___
>
Maybe you mean this?

 UPDATE myref
SET upfu=(SELECT dzhhq.upfu FROM dzhhq
WHERE dzhhq.stkname=myref.stkname)
WHERE EXISTS (SELECT * FROM dzhhq WHERE dzhhq.stkname=myref.stkname);

--
   --
  --
 --Ô¿Ô--
K e V i N
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


  1   2   >