[sqlite] CVE-2019-5018, Resolved Which Version?

2019-06-04 Thread Mike Nicolino
Apologies if this has been covered earlier, searched back through history and 
didn't find anything the answer.

I am trying to determine which version CVE-2019-5018 is resolved in.  The Talos 
post (https://talosintelligence.com/vulnerability_reports/TALOS-2019-0777) 
references a vendor patch on 2019-03-28, but there's no SQLite release on that 
date.  My theory is that it is resolved in the 3.28 SQLite release (rather than 
on that date), but I'd like confirmation as the release notes for 3.27 and 3.28 
don't reference it.

Thanks,
Mike Nicolino
Centrify Corporation

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


[sqlite] Virtual Table BestIndex Being Passed LIKE constraints in SQLite 3.13.0?

2016-06-24 Thread Mike Nicolino
Hey Everyone,

I'm got a system with virtual tables using System.Data.SQLite 1.0.102.0/SQLite 
version 3.13.0, the LIKE constraint for queries is now being passed to the 
virtual table BestIndex functions (BestIndex is getting 65 as its 
constraint.op).  I had asked a question regarding LIKE constraints and virtual 
tables a while back and the response was that LIKE constraints were intended to 
never be passed to virtual table BestIndex due to LIKE being able to be 
overridden by the application (conversion pasted at end of this mail).

Is the behavior in 3.13.0 a bug or has something changed that now makes it 
possible for the LIKE constraint to be sent to virtual tables?

Thanks,
Mike Nicolino


On 3/5/15, Mike Nicolino <mike.nicol...@centrify.com> wrote:

> I'm using System.Data.SQLite version 1.0.95.0 and have what appears to

> be a bug with Virtual Tables.  Queries using 'like' in the where

> clause are not getting the like clause passed to BestIndex as a query 
> constraint.

> Specifically:

>

>

> -  Simple query: select * from foo where name like 'a%'



The LIKE operator can be overridden by the application to mean anything the 
application wants - it is not compelled to follow standard SQL semantics.  For 
that reason, virtual tables are unable to optimize using LIKE since they have 
no way of knowing what it will do.



Works as designed.



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


[sqlite] Accessing an encyrpted Sqlite Database

2016-05-17 Thread Mike Nicolino
System.Data.SQLite I believe has its own SEE implementation embedded.  Unsure 
if its compatible with SEE or not.  In order to access an encrypted DB outside 
of System.Data.SQLite, the same encryption module would have to be available in 
your C++ implementation.

If your project has this requirement, I expect it would be easier/safer to make 
use of SEE in both System.Data.SQLite and your C++ implementation to ensure the 
encryption modules are compatible.

Thanks,
Mike Nicolino


-Original Message-
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Ryan Irwin
Sent: Monday, May 16, 2016 1:00 PM
To: sqlite-users at mailinglists.sqlite.org
Subject: [sqlite] Accessing an encyrpted Sqlite Database

Sqlite Support,
If there is a particular database that was created using DotNet's 
System.Data.Sqlite, and that database was encrypted with a "Password" argument 
via the SqliteConnection string.
Would it be possible to access that encrypted database by means of the native 
C++ language using Visual Studio, Windows, and the public version of SQLite?

I am aware of the SEE but am lead to believe that it may be proprietary and 
would not match the encryption method used by the DotNet and SQLite.Interop.

Thank you for any assistance provided,
Ryan



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


[sqlite] SQLite SEE with FIPS compliant Encryption?

2016-04-27 Thread Mike Nicolino
Hello Everyone,

We're using SQLite SEE to encrypt our databases and I was wondering if there is 
a version of SEE that is FIPS compliant/certificated?  Even a version that made 
use of the FIPS Windows APIs for encryption since our target platform is 
limited to Windows.  (I'm aware that the enterprise version of SQLCipher lists 
a FIPS version; I was hoping we could keep our current implementation which 
uses SEE however).

I'm considering a local modification to SEE to have it call the Windows APIs 
rather that doing its own encryption; has anyone tried such a thing before?

Thanks,
Mike Nicolino
Lead Engineer
Centrify Corporation  |  Follow Us!   
LinkedIn<https://www.linkedin.com/company/centrify-corporation>  
Twitter<https://twitter.com/Centrify>



[sqlite] What's the best way to pass function information to virtual table?

2015-06-23 Thread Mike Nicolino
I'll summarize what I've done; note that I don't consider myself an 'expert' in 
this area.  What I have works, but others may have suggestions on improvements. 
 (I'd actually be happy to hear any suggestions).

For my virtual tables I generate an additional 'special' column called 
'_MatchFilter' (the leading underscore is my convention identifying it as 
'special').  It's a string column that returns either empty string or the 
specified 'filter' from the where clause if specified.  This column is a 
placeholder and not useful, except when used in a where clause with 'match' or 
'='.  In these cases, my BestIndex prefers queries including _MatchFilter with 
'match' or '=' over all others and Filter takes the match/= compare value and 
passes it as a custom query to my 'table' so it can do things more efficiently. 
 Example:

select * from MyTable where _MatchFilter match "my custom query here"
select * from MyTable where _MatchFilter = "my custom query here"

You still have to handle cases where _MatchFilter gets 'and'ed with additional 
clauses of course in your BestIndex and Filter, though at worst you should be 
able to run your custom query and then in memory filter the results on the 
other clause (or vice versa).  But you can get really crazy with what you allow 
for the filter in this manner, passing it directly to your virtual table 
implementation.

What you want to do with Average is somewhat different; you really don't need a 
custom query, but a way to avoid having SQLite do the average for your table.  
One trick I can think of is adding your own special column to the table 
'_Average', that returns the calculated average.  Its somewhat strange in that 
ever 'row' would contain the average of course.  If it's still expensive to 
calculate, you might require something similar to my _MatchFilter' arrangement 
to cause '_Average' to generate and return '0' for it if not present in the 
where clause.

This is all somewhat hacky of course and non-standard if you're exposing SQL to 
users.

MikeN


-Original Message-
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Jerry
Sent: Monday, June 22, 2015 2:47 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] What's the best way to pass function information to 
virtual table?

Hi, MikeN.

Assuming I want to compute the average value of all keys, how to write the 
query for this using match?

For example, if I write SQL in this way

> SELECT avg(key) From table WHERE key MATCH('avg');

with MATCH info, the virtual table is able to know the query is looking for 
average value for the keys.
Now, assume the virtual table is able to compute the average faster than 
SQLite, after I get the average value, how can I return the result immediately 
without SQLite going through the aggregator avg()?

What are your queries like when you "pass arbitrary specialized queries 
directly to my virtual table"?

Thanks,
-C.Lin

2015-06-17 8:48 GMT-07:00 Mike Nicolino :

> The override of match() trick works pretty well for cases like this.  
> I've overridden match in my virtual table implementation to allow me 
> to pass arbitrary specialized queries directly to my virtual table 
> modules for cases that I know the virtual table can do a better job 
> that SQLite on that query.  Downside is if you're exposing the SQL to 
> users of course as using match in such a manner is non-standard.
>
> MikeN
>
>
> -Original Message-
> From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:
> sqlite-users-bounces at mailinglists.sqlite.org] On Behalf Of Clemens 
> Ladisch
> Sent: Wednesday, June 17, 2015 1:23 AM
> To: sqlite-users at mailinglists.sqlite.org
> Subject: Re: [sqlite] What's the best way to pass function information 
> to virtual table?
>
> Jerry wrote:
> > With xBestIndex and xFilter, we can pass the constraint information 
> > (e.g., those from WHERE clause) to virtual table (through struct 
> > sqlite3_index_info), so that we can locate the cursor to narrow the 
> > search space.
> > However, it does not provide information about functions used in SQL 
> > queries.
> >
> > For example,
> >
> >> SELECT MAX(key) from Table tab;
> >
> > The virtual table has no way to know the function MAX is called
>
> SQLite has a special optimization for this particular query, and 
> rewrites it as "SELECT key FROM tab ORDER BY key DESC LIMIT 1".
>
> > The virtual table provides xFindFunction to override functions 
> > (maybe this can be used to pass some information).
>
> For example, the full-text search module overrides the match() 
> function; you could do something similar:
>   SELECT key FROM tab WHERE tab MATCH 'max(key)'
>

[sqlite] What's the best way to pass function information to virtual table?

2015-06-17 Thread Mike Nicolino
The override of match() trick works pretty well for cases like this.  I've 
overridden match in my virtual table implementation to allow me to pass 
arbitrary specialized queries directly to my virtual table modules for cases 
that I know the virtual table can do a better job that SQLite on that query.  
Downside is if you're exposing the SQL to users of course as using match in 
such a manner is non-standard.

MikeN


-Original Message-
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Clemens 
Ladisch
Sent: Wednesday, June 17, 2015 1:23 AM
To: sqlite-users at mailinglists.sqlite.org
Subject: Re: [sqlite] What's the best way to pass function information to 
virtual table?

Jerry wrote:
> With xBestIndex and xFilter, we can pass the constraint information 
> (e.g., those from WHERE clause) to virtual table (through struct 
> sqlite3_index_info), so that we can locate the cursor to narrow the 
> search space.
> However, it does not provide information about functions used in SQL 
> queries.
>
> For example,
>
>> SELECT MAX(key) from Table tab;
>
> The virtual table has no way to know the function MAX is called

SQLite has a special optimization for this particular query, and rewrites it as 
"SELECT key FROM tab ORDER BY key DESC LIMIT 1".

> The virtual table provides xFindFunction to override functions (maybe 
> this can be used to pass some information).

For example, the full-text search module overrides the match() function; you 
could do something similar:
  SELECT key FROM tab WHERE tab MATCH 'max(key)'

> But it seems only general functions can be override -- it has not 
> effect on aggregate functions.

The virtual table interface does not allow access to all the internals of the 
query optimizer.

When there is an aggregate function, you can filter the rows that will be given 
to it, but the actual aggregation is still done by SQLite.

If you can compute aggregates more efficiently than SQLite, you could create a 
separate virtual table:
  SELECT max_key FROM tab_agg
but this would not work for more complex queries.


Regards,
Clemens
___
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] System.Data.SQLite, Virtual Tables, and ThreadAbortException Issues

2015-05-13 Thread Mike Nicolino
Yes, this branch does resolve the issue, thanks much!

This branch looks to be from the current mainline; I'll apply the fix locally 
to the 1.0.96.0 released version until the next release of System.Data.SQLite.

Thanks,
MikeN


-Original Message-
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Joe 
Mistachkin
Sent: Tuesday, May 12, 2015 8:43 PM
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] System.Data.SQLite, Virtual Tables, and 
ThreadAbortException Issues


Mike Nicolino wrote:
>
> The issue is isolated to ThreadAbortException since you can't catch it 
> and prevent it from being re-thrown.  I did find a 'fix' for a similar 
> issue in SystemData.SQLite back on 10/11/2012:
>

Thanks for the excellent analysis of the issue.  I believe you are completely 
correct.

The previous "fix" was for sqlite3_prepare(), to prevent any leakage of native 
handles prior to their ownership being "transferred" into an official critical 
handle object.

I've now implemented the necessary changes on a branch, pending more testing,
here:

https://system.data.sqlite.org/index.html/timeline?r=stepNoThreadAbort

Could you test these changes in your environment and let us know if they clear 
the issue?

--
Joe Mistachkin

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


[sqlite] System.Data.SQLite, Virtual Tables, and ThreadAbortException Issues

2015-05-13 Thread Mike Nicolino
Hey Everyone,

For reference I'm using version 1.0.95.0 of System.Data.SQLite.

I've got System.Data.SQLite embedded in our cloud web service using virtual 
table modules to access our various data sources.  Our IIS is configured to 
abort requests that exceed a maximum time threshold (required for among other 
things to prevent a malicious user from sucking up web resources by spawning 
repeated long running requests).  The effect is IIS will abort threads that 
exceed the time threshold.  I'm seeing the GC finalizer get stuck trying to 
finalize an object in SQLite.Interop, blocking on a critical section (which 
eventually leads to memory exhaustion).  After a lot of digging, I believe the 
situation is as follows:


-  Request for a long running query via SQLite starts

-  SQLite 'step' is called, drops into unmanaged code, enters a 
critical section, then calls back to managed code for virtual table processing

-  IIS aborts the thread causing a ThreadAbortException in managed code 
(Virtual table processing)

-  Stack starts unrolling due to the ThreadAbortException, which 
prevents the unmanaged code from releasing the critical section

-  Finalizer gets stuck trying to acquire the critical section when the 
underlying System.Data.SQLite object(s) are getting finalized.

The issue is isolated to ThreadAbortException since you can't catch it and 
prevent it from being re-thrown.  I did find a 'fix' for a similar issue in 
SystemData.SQLite back on 10/11/2012:


https://system.data.sqlite.org/index.html/fdiff?v1=3994ed2958c14a11=d05529e749a4f10b=1

I don't think the 'step' code is protected in the manner of the above fix 
(likely unneeded at the time, since virtual tables were not supported and there 
wasn't a case of 'step' dropping into unmanaged code and then back to managed 
code).

Questions:

-  Have I evaluated this issue correctly or is there potentially 
something wrong with my integration?

-  Presuming this is a bug, does anyone have a workaround suggestion?  
I'm somewhat hesitant to change the 'step' source in System.Data.SQLite to use 
the same approach as the 10/11/2012 fix, worrying about other potential side 
effects.

Thanks,
MikeN





[sqlite] Virtual Table BestIndex Bug in system.data.sqlite/sqlite with 'like'

2015-03-05 Thread Mike Nicolino
Hmm, yes this will work.  Though re-educating users writing their own queries 
to avoid like in this case will be an ongoing challenge. :)  But I do 
understand that generic 'like' support for Virtual Tables given the ability to 
override would be very challenging to implement generically.

MikeN


-Original Message-
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Jay Kreibich
Sent: Thursday, March 05, 2015 10:55 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Virtual Table BestIndex Bug in system.data.sqlite/sqlite 
with 'like'


On Mar 5, 2015, at 12:30 PM, Mike Nicolino  
wrote:

> I'm using System.Data.SQLite version 1.0.95.0 and have what appears to be a 
> bug with Virtual Tables.  Queries using 'like' in the where clause are not 
> getting the like clause passed to BestIndex as a query constraint.  
> Specifically:
> 


"LIKE" is not a supported virtual table index constraint.  See: 
http://www.sqlite.org/c3ref/c_index_constraint_eq.html   As such, it cannot be 
passed to a virtual table implementation, and the constraint is handled by the 
SQLite engine above the virtual table implementation.

Given that the LIKE expression is translated into an SQL function, which the 
application can override, it would be difficult for a virtual table to 
correctly implement a LIKE operation internally, while matching the exact 
functionality of the current LIKE function.

Consider a statement like this:

SELECT * FROM myVirtualTable AS vt WHERE returnThisRow_CustomFunction( 
vt.col1 );

If returnThisRow_CustomFunction() is a function returns a true or false based 
on... well, who knows what... there is no way for a virtual table 
implementation to understand the inter-workings of that function and pre-filter 
the rows.  LIKE is no different.



It should be noted that MATCH is a supported virtual table index constraint 
supported.  Along with the virtual table xFindFunction() function allows a 
virtual table to implement a table specific filter function.  This is how the 
FTS extensions implement searches.

Consider providing a virtual table specific MATCH function, over-ride use on 
your table with xFindFunction(), and rewrite statements using MATCH rather than 
LIKE.

See the FTS modules as examples.  You might want to start here: 
https://www.sqlite.org/fts3.html


 -j



--  
Jay A. Kreibich < J A Y @ K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it, but showing 
it to the wrong people has the tendency to make them feel uncomfortable." -- 
Angela Johnson





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


[sqlite] Virtual Table BestIndex Bug in system.data.sqlite/sqlite with 'like'

2015-03-05 Thread Mike Nicolino
> I'm using System.Data.SQLite version 1.0.95.0 and have what appears to 
> be a bug with Virtual Tables.  Queries using 'like' in the where 
> clause are not getting the like clause passed to BestIndex as a query 
> constraint.
> Specifically:
>
>
> -  Simple query: select * from foo where name like 'a%'

The LIKE operator can be overridden by the application to mean anything the 
application wants - it is not compelled to follow standard SQL semantics.  For 
that reason, virtual tables are unable to optimize using LIKE since they have 
no way of knowing what it will do.

Works as designed.


Not communicating the like constraint to virtual tables make it impossible for 
a virtual table to do query optimization to be done in that case.  I realize 
like behavior can be overridden, but the resulting 'query' still needs to 
filter down to virtual table in some way to avoid full table scans.  Otherwise 
any queries using 'like' against a virtual table of a substantial size become 
potentially unusable depending on 'time' required for a full table scan.

Incidentally, this used to 'work' in a much older version of SQLite, though the 
semantics may not have been correct in all cases.  Version 3.7.7.1, ended up 
transforming like to of pair of constraints in the "like 'a%'" case which were 
passed to BestIndex.

Thanks,
MikeN



-Original Message-
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Richard Hipp
Sent: Thursday, March 05, 2015 10:46 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Virtual Table BestIndex Bug in system.data.sqlite/sqlite 
with 'like'

On 3/5/15, Mike Nicolino  wrote:
> I'm using System.Data.SQLite version 1.0.95.0 and have what appears to 
> be a bug with Virtual Tables.  Queries using 'like' in the where 
> clause are not getting the like clause passed to BestIndex as a query 
> constraint.
> Specifically:
>
>
> -  Simple query: select * from foo where name like 'a%'

The LIKE operator can be overridden by the application to mean anything the 
application wants - it is not compelled to follow standard SQL semantics.  For 
that reason, virtual tables are unable to optimize using LIKE since they have 
no way of knowing what it will do.

Works as designed.

>
> -  Break inside module BestIndex
>
> -  SQLiteIndex.Inputs.Constraints has 0 length (no constraints)
>
> The above causes a full table scan of the virtual table for queries 
> using 'like', which is very bad for any virtual table of a substantial size.
> Virtual tables need to be able to use 'like' clauses to restrict 
> result set size.
>
> Before I bug this issue, is anyone aware of it and have any workaround?
> Currently, the only workaround I've got, is telling users don't use 'like'
> in their queries (obviously not a good thing).
>
> Thanks,
> MikeN
>
> ___
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


--
D. Richard Hipp
drh at sqlite.org
___
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Next version of System.Data.Sqlite bug fixes only or new features?

2015-03-05 Thread Mike Nicolino
1.0.96.0 is already released and its bug fix only per the release notes:

System.Data.SQLite version 1.0.96.0 (with SQLite 3.8.8.3) is now available on 
the System.Data.SQLite website:

 https://system.data.sqlite.org/

Further information about this release can be seen at

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


-Original Message-
From: sqlite-users-bounces at mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Andy (KU7T)
Sent: Thursday, March 05, 2015 10:34 AM
To: sqlite-users at mailinglists.sqlite.org
Subject: [sqlite] Next version of System.Data.Sqlite bug fixes only or new 
features?

I have been reading there are a few issues with v 95, so I am waiting for the 
next. Will there be a version that has only bug fixes or new features as well? 
As many of you know, new features usually also create regressions.



Thanks

Andy



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


[sqlite] Virtual Table BestIndex Bug in system.data.sqlite/sqlite with 'like'

2015-03-05 Thread Mike Nicolino
I'm using System.Data.SQLite version 1.0.95.0 and have what appears to be a bug 
with Virtual Tables.  Queries using 'like' in the where clause are not getting 
the like clause passed to BestIndex as a query constraint.  Specifically:


-  Simple query: select * from foo where name like 'a%'

-  Break inside module BestIndex

-  SQLiteIndex.Inputs.Constraints has 0 length (no constraints)

The above causes a full table scan of the virtual table for queries using 
'like', which is very bad for any virtual table of a substantial size.  Virtual 
tables need to be able to use 'like' clauses to restrict result set size.

Before I bug this issue, is anyone aware of it and have any workaround?  
Currently, the only workaround I've got, is telling users don't use 'like' in 
their queries (obviously not a good thing).

Thanks,
MikeN



Re: [sqlite] Having problems with Entity Framework code first db creation

2015-01-23 Thread Mike Nicolino
This sounds like a problem with the connection string being passed to 
SQLiteConnection.  Your attached package didn't come through, so could you send 
the connection string you're using?


-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Walter Williams
Sent: Friday, January 23, 2015 6:52 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] Having problems with Entity Framework code first db creation

I'm trying to use a code first model using the System.Data.SQlite NuGet
(v1.0.94.1) package and Entity Framework.  I'm using VS 2013.

I have defined my objects, but when I try to create a new database file using 
them, I get an error "Unable to complete operation. The supplied SqlConnection 
does not specify an initial catalog or AttachDBFileName."

The attached project has a sample of the code which demonstrates the error.
For size the packages folder is not included.  I was able to use the same code 
with SQL Server Compact 4.0 but for preference I'd like to use SQLite.

Is this a bug in the package or am I missing something?


Walter Williams
Senior Software Engineer
Sawtooth Software, Inc.


"Do, or do not.  There is no try."

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


Re: [sqlite] System.Data.SQLite - Exception Calling SQLiteModule.DeclareTable

2015-01-23 Thread Mike Nicolino
In my specific case, I'm using virtual tables to hook up a non-sql data source 
to SQLite.  Wanted to 'quote' column names to avoid issues with a column 
colliding with an sql keyword rather than avoiding use of strange characters.

MikeN


-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Stephen Chrzanowski
Sent: Friday, January 23, 2015 1:07 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] System.Data.SQLite - Exception Calling 
SQLiteModule.DeclareTable

In the 8.3 days, I routinely gave directories an underscore as a delimiter for 
version information, prior to my actually using a version control package.  So 
"game" would be the main thing, and if I wanted to test, "game_1" became the 
new WIP folder.  If I liked what I did, I'd move "game"
to "game__1" and rename "game_1" to "game".  I even sometimes went so far as 
adding an extension to a directory, so, "mkdir game.1".  LOVED how that screwed 
some of the DOS toys up when a directory contained an extension. :]

On Thu, Jan 22, 2015 at 8:13 PM, Keith Medcalf <kmedc...@dessus.com> wrote:

>
> Probably for the same reason people exceed 8.3 filename limitations on 
> Windows or try to embed non-alphanumeric characters in file/directory 
> names (Including spaces and shell special characters) -- they have 
> been told that they could do so and not told of the problems and 
> difficulties  created by doing so.
>
> I cannot fathom why one would use underscores either.
>
> In both cases the only rational explanation I can come up with as that 
> these folks are "users" or "coders" and not "programmers" ...
>
> ---
> Theory is when you know everything but nothing works.  Practice is 
> when everything works but no one knows why.  Sometimes theory and 
> practice are
> combined:  nothing works and no one knows why.
>
> >-Original Message-
> >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- 
> >boun...@sqlite.org] On Behalf Of Hick Gunter
> >Sent: Thursday, 22 January, 2015 01:39
> >To: 'General Discussion of SQLite Database'
> >Subject: Re: [sqlite] System.Data.SQLite - Exception Calling 
> >SQLiteModule.DeclareTable
> >
> >I have always wondered why people will insist on using human readable 
> >column names (with embedded spaces and special characters) in the 
> >implementation layer (SQL code) instead of the presentation layer 
> >(user interface). The clutter introduced into queries by having to 
> >quote the column names by far outweighs any gain from having "some 
> >strange field name" displayed instead of some_strange_field_name...
> >
> >-Ursprüngliche Nachricht-
> >Von: Mike Nicolino [mailto:mike.nicol...@centrify.com]
> >Gesendet: Donnerstag, 22. Jänner 2015 02:17
> >An: General Discussion of SQLite Database
> >Betreff: Re: [sqlite] System.Data.SQLite - Exception Calling 
> >SQLiteModule.DeclareTable
> >
> >Figured this one out.  DeclareTable doesn't like any 'quoting' around 
> >the column names in the sql.  It works fine with just straight column names.
> >
> >
> >-Original Message-
> >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- 
> >boun...@sqlite.org] On Behalf Of Mike Nicolino
> >Sent: Saturday, January 17, 2015 6:17 PM
> >To: sqlite-users@sqlite.org
> >Subject: [sqlite] System.Data.SQLite - Exception Calling 
> >SQLiteModule.DeclareTable
> >
> >I'm getting an exception calling SQLiteModule.DeclareTable that seems 
> >to imply the 'create table' sql being passed is invalid: "SQL logic 
> >error or missing database".  Yet using that same sql on the same 
> >connection as a create table call succeeds.  Reviewing the virtual 
> >table docs don't imply there are restrictions on the create table sql 
> >for virtual tables so I'm at a loss to what's wrong.
> >
> >The create table sql (the line breaks here are for readability and 
> >not present in the actual string send to DeclareTable):
> >
> >create table xxx(
> >"Username" text,
> >"DisplayName" text,
> >"Email" text,
> >"LastLogin" integer,
> >"LastInvite" integer,
> >"Status" text,
> >"SourceDs" text,
> >"Data" text,
> >"SourceDsLocalized" text
> >)
> >
> >Anyone have any input on what might be wrong?
> >Thanks!
> >
> >___
> >sqlite-users mailing list
> >sqlite-us

Re: [sqlite] System.Data.SQLite - Exception Calling SQLiteModule.DeclareTable

2015-01-21 Thread Mike Nicolino
Figured this one out.  DeclareTable doesn't like any 'quoting' around the 
column names in the sql.  It works fine with just straight column names.


-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] 
On Behalf Of Mike Nicolino
Sent: Saturday, January 17, 2015 6:17 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] System.Data.SQLite - Exception Calling 
SQLiteModule.DeclareTable

I'm getting an exception calling SQLiteModule.DeclareTable that seems to imply 
the 'create table' sql being passed is invalid: "SQL logic error or missing 
database".  Yet using that same sql on the same connection as a create table 
call succeeds.  Reviewing the virtual table docs don't imply there are 
restrictions on the create table sql for virtual tables so I'm at a loss to 
what's wrong.

The create table sql (the line breaks here are for readability and not present 
in the actual string send to DeclareTable):

create table xxx(
"Username" text,
"DisplayName" text,
"Email" text,
"LastLogin" integer,
"LastInvite" integer,
"Status" text,
"SourceDs" text,
"Data" text,
"SourceDsLocalized" text
)

Anyone have any input on what might be wrong?
Thanks!

___
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] System.Data.SQLite - Exception Calling SQLiteModule.DeclareTable

2015-01-17 Thread Mike Nicolino
I'm getting an exception calling SQLiteModule.DeclareTable that seems to imply 
the 'create table' sql being passed is invalid: "SQL logic error or missing 
database".  Yet using that same sql on the same connection as a create table 
call succeeds.  Reviewing the virtual table docs don't imply there are 
restrictions on the create table sql for virtual tables so I'm at a loss to 
what's wrong.

The create table sql (the line breaks here are for readability and not present 
in the actual string send to DeclareTable):

create table xxx(
"Username" text,
"DisplayName" text,
"Email" text,
"LastLogin" integer,
"LastInvite" integer,
"Status" text,
"SourceDs" text,
"Data" text,
"SourceDsLocalized" text
)

Anyone have any input on what might be wrong?
Thanks!

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


[sqlite] System.Data.Sqlite Virtual Table Example?

2014-12-15 Thread Mike Nicolino
Does anyone by chance know of an example of implementing virtual tables with 
System.Data.Sqlite?  The help docs are decent, but seeing an example 
implementation would be quite helpful to tie it all together.

Thanks!

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