Re: [sqlite] System.Data.Sqlite extension function - performing INSERT

2012-06-30 Thread Joe Mistachkin

Brad Hards wrote:
>
> Is there a workaround to get at the underlying connection from my
> extension function class?
> 

Not easily because they are technically not associated with a particular
connection (i.e. they are simply imported into each opened connection
from a static list.

>
> Is there anything to be aware of in implementing a "SQLiteFunction2"
> that does allow access to the underlying connection?
> 

You'll need to figure out when the functions should be imported into
the connection and how to deal with name collisions (i.e. unless you
plan on removing the existing mechanism).

--
Joe Mistachkin

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


Re: [sqlite] SQLite4 (don't scream)

2012-06-30 Thread Stephan Beal
On Fri, Jun 29, 2012 at 8:33 PM, Jim Morris  wrote:

> Are there significant improvements in speed for existing SQL?
>

In my _simple_ tests (which run _almost_ the same ops through mysql5,
sqlite3, and now sqlite4), i'm seeing _huge_ boosts in speed in v4 (25x
over v3!) BUT:

a) this is not necessarily indicative of "what will be" because v4 will
certainly see significant changes before it stabilizes. i'm also using a
variety of flags just to get it to build, and can't say with certainty what
is enabled/disabled at the moment (not all valid combinations build right
now). e.g. i might have syncing turned off in the v4 build (but certainly
don't in my v3 build).

b) my tests which use auto-increment/last-row-id are disabled for v4 (it
doesn't yet do those), so those tests inherently have a few fewer calls
into the db (but not enough fewer to account for a 25x speed increase).


In other words, what i'm seeing might just be a fluke of nature.



> How does the compiled size compare with SQLite3?


The sized on my machine can't be directly compared because i've only got v4
building as a static lib, but the current static lib sizes on x64 Linux:

libsqlite3.a 5214256
libsqlite4.a 3753496

but again, that is not necessarily any indication of what it will look like
in 13 hours or 6 months. Nor does it give any hint about what the different
will mean for clients linked to it.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLite4 (don't scream)

2012-06-30 Thread Jim Morris

Are there significant improvements in speed for existing SQL?

How does the compiled size compare with SQLite3?


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


Re: [sqlite] An interesting (strange) issue with selects

2012-06-30 Thread Dennis Volodomanov

On 30/06/2012 8:22 PM, Kees Nuyt wrote:

Mind you, there is a difference between the "special folders" (=symbolic
path names) :

AppDataFolder
= Full path to the Roaming folder for the current user

and

CommonAppDataFolder
= Full path to application data for all users.

and

LocalAppDataFolder
= Full path to the folder that contains local
 (nonroaming) applications.

To my understanding, CommonAppDataFolder is virtualized to

\Users\%USER%\AppData\Local\VirtualStore\ProgramData\ ,

which is at least a form of protection. Also, normal users would not be
able to delete files from CommonAppDataFolder , which is another form of
protection.

I haven't hacked Windows for a long time, but my guess is:

1) you are running as administrator,
2) or you (partially) disabled protection.

Which is not the best way to test applications.

Only your installer / uninstaller should touch CommonAppDataFolder .

I suppose the merits and best practices of folder virtualization are
documented on MSDN somewhere.

You are certainly not the first one to bump into this, a popular search
engine gives me  909000  hits on q=windows7+programdata, for example

http://www.codingquestion.info/6732413/deleting-file-from-cprogramdata-in-windows-7-does-not-really-delete-the-file/post



Well, I was going by MSDN and I'm using CSIDL_COMMON_APPDATA which is 
defined by MSDN as: "The file system directory that contains application 
data for all users. A typical path is C:\Documents and Settings\All 
Users\Application Data. This folder is used for application data that is 
not user specific. For example, an application can store a spell-check 
dictionary, a database of clip art, or a log file in the 
CSIDL_COMMON_APPDATA folder. This information will not roam and is 
available to anyone using the computer." It doesn't actually mention 
that this folder is best used for read-only files, but I found a 
reference to this elsewhere.


I think I may be better off using the CSIDL_COMMON_DOCUMENTS, so that's 
what I'll switch to and try next. I can't use a personal folder, since 
the data also needs to be accessed by a service, which won't have user's 
credentials.


Thanks!

   Dennis

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


Re: [sqlite] An interesting (strange) issue with selects [solved]

2012-06-30 Thread Marcus Grimm

Am 2012-06-30 12:06, schrieb Dennis Volodomanov:

On 30/06/2012 7:47 PM, Marcus Grimm wrote:

Here is another theory:

Maybe you run into an issue with Windows 7 Virtualization,
I did run into a similar effect with the registry access/write
sometime go - mainly with Windows 7 Home Editions,
by reading this:
http://support.microsoft.com/kb/927387/EN-US

It suggests that something similar can also apply on files in
certain programdata folders.



I think you just nailed it! From that link, Scenario 4 - I go into
that Virtual folder and lo and behold - there's only file there and
it's my app's database! I've killed that and then tried the usual
sqlite shell routine and it's all back to normal (e.g. there is no
data in the database file, which is all correct). Wow :)


Cool... :-)

Boy... isn't that crazy what WIndows occasionally does just to follow
some overzealous security constrains ?

Sometimes I really glorify the good old windows NT / Win2000 times.

Marcus



Thank you for solving this and hopefully this helps someone in the
future facing the same problem - if you are using Windows 7 (Ultimate
in my case) and you see a file which shouldn't be there, check the
link: http://support.microsoft.com/kb/927387/EN-US and see if any of
the scenarios listed there apply to you.

   Dennis

___
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] An interesting (strange) issue with selects

2012-06-30 Thread Kees Nuyt
On Sat, 30 Jun 2012 18:32:58 +1000, Dennis Volodomanov
 wrote:

> On 30/06/2012 12:57 PM, Kees Nuyt wrote:
>>
>> Is the database file in a protected folder (that is, "\Program Files",
>> or somewhere in the Windows system software tree) ?
>>
>> It shouldn't be. Data belongs somewhere else. Either in your
>> userprofile/appdata or in a completely separate dirtree that Microsoft
>> doesn't try to manage.
>>
>> HTH
>>
>
> No, the database is not in a protected folder, it's in the common 
> appdata folder (ProgramData on Windows7).

Mind you, there is a difference between the "special folders" (=symbolic
path names) :

AppDataFolder 
= Full path to the Roaming folder for the current user

and

CommonAppDataFolder 
= Full path to application data for all users.

and

LocalAppDataFolder
= Full path to the folder that contains local
 (nonroaming) applications. 

To my understanding, CommonAppDataFolder is virtualized to

\Users\%USER%\AppData\Local\VirtualStore\ProgramData\ , 

which is at least a form of protection. Also, normal users would not be
able to delete files from CommonAppDataFolder , which is another form of
protection. 

I haven't hacked Windows for a long time, but my guess is:

1) you are running as administrator, 
2) or you (partially) disabled protection.

Which is not the best way to test applications.

Only your installer / uninstaller should touch CommonAppDataFolder .

I suppose the merits and best practices of folder virtualization are
documented on MSDN somewhere.

You are certainly not the first one to bump into this, a popular search
engine gives me  909000  hits on q=windows7+programdata, for example

http://www.codingquestion.info/6732413/deleting-file-from-cprogramdata-in-windows-7-does-not-really-delete-the-file/post

-- 
Regards,

Kees Nuyt

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


Re: [sqlite] An interesting (strange) issue with selects [solved]

2012-06-30 Thread Dennis Volodomanov

On 30/06/2012 7:47 PM, Marcus Grimm wrote:

Here is another theory:

Maybe you run into an issue with Windows 7 Virtualization,
I did run into a similar effect with the registry access/write
sometime go - mainly with Windows 7 Home Editions,
by reading this:
http://support.microsoft.com/kb/927387/EN-US

It suggests that something similar can also apply on files in
certain programdata folders.



I think you just nailed it! From that link, Scenario 4 - I go into that 
Virtual folder and lo and behold - there's only file there and it's my 
app's database! I've killed that and then tried the usual sqlite shell 
routine and it's all back to normal (e.g. there is no data in the 
database file, which is all correct). Wow :)


Thank you for solving this and hopefully this helps someone in the 
future facing the same problem - if you are using Windows 7 (Ultimate in 
my case) and you see a file which shouldn't be there, check the link: 
http://support.microsoft.com/kb/927387/EN-US and see if any of the 
scenarios listed there apply to you.


   Dennis

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


Re: [sqlite] An interesting (strange) issue with selects

2012-06-30 Thread Marcus Grimm

Here is another theory:

Maybe you run into an issue with Windows 7 Virtualization,
I did run into a similar effect with the registry access/write
sometime go - mainly with Windows 7 Home Editions,
by reading this:
http://support.microsoft.com/kb/927387/EN-US

It suggests that something similar can also apply on files in
certain programdata folders.

Marcus

Am 2012-06-30 10:32, schrieb Dennis Volodomanov:

On 30/06/2012 12:57 PM, Kees Nuyt wrote:


Is the database file in a protected folder (that is, "\Program 
Files",

or somewhere in the Windows system software tree) ?

It shouldn't be. Data belongs somewhere else. Either in your
userprofile/appdata or in a completely separate dirtree that 
Microsoft

doesn't try to manage.

HTH



No, the database is not in a protected folder, it's in the common
appdata folder (ProgramData on Windows7).

Dennis
___
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] An interesting (strange) issue with selects

2012-06-30 Thread Dennis Volodomanov

On 30/06/2012 12:57 PM, Kees Nuyt wrote:


Is the database file in a protected folder (that is, "\Program Files",
or somewhere in the Windows system software tree) ?

It shouldn't be. Data belongs somewhere else. Either in your
userprofile/appdata or in a completely separate dirtree that Microsoft
doesn't try to manage.

HTH



No, the database is not in a protected folder, it's in the common 
appdata folder (ProgramData on Windows7).


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


Re: [sqlite] how to get SQLite 4 source?

2012-06-30 Thread E. Timothy Uy
Hi Darren,

1. Install Fossil - http://www.fossil-scm.org.
2. At a command prompt or console, 'fossil clone
http://www.sqlite.org/src4sqlite4.fossil'.
3. (Not sure if this the "right" way) From here I usually 'mkdir
sqlite4_src', 'cd sqlite_src', then 'fossil open ../sqlite4.fossil'

Respectfully,
Tim




On Fri, Jun 29, 2012 at 9:50 PM, Darren Duncan wrote:

> Forgive me if I seem dense, but from http://www.sqlite.org/src4/**
> doc/trunk/www/index.wikiand
>  elsewhere on
> sqlite.org, though I can see individual source files, I don't see any
> place to get the whole SQLite 4 source at once, either as a tarball or
> version control instructions. So where do we go to actually download and
> play with it? -- Darren Duncan
> __**_
> 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