[sqlite] System.Data.SQLite [nuGet] 1.0.82.0 dll issue

2012-10-16 Thread Bernhard Mogens Ege
Hi,

 

Now that 1.0.82.0 is available as a nuget package, I tried to use it. 

 

I added the x32/x64 package and this completed without problems.

 

It added the references and a x32 and x64 folder, each with
SQLite.Interop.dll files.

 

My problem:

 

When building a setup project, the interop dll files are not included and
hence the program will not work when installed. Only the
System.Data.SQLite[.Linq].dll assemblies are included in the setup project.

 

The Build Action for the interop dll files is Content and Copy to Output
Directory is Copy always.

 

What should I do to have the x32 and x64 interop dlls to be included in the
setup project?

 

VS2010 does not detect that the interop dlls are necessary. :-/

 

Thanks,

 

Bernhard

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


Re: [sqlite] System.Data.SQLite [nuGet] 1.0.82.0 dll issue

2012-10-16 Thread Bernhard Mogens Ege
I made it work by including Content files in the Application folder in the
Setup project.
The setup file installs perfectly now on a clean server. 
Everything is neat now. :)

Bernhard


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 16. oktober 2012 16:05
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] System.Data.SQLite [nuGet] 1.0.82.0 dll issue


Bernhard Mogens Ege wrote:
 
 When building a setup project, the interop dll files are not included 
 and hence the program will not work when installed. Only the 
 System.Data.SQLite[.Linq].dll assemblies are included in the setup
project. 
 

My answer to this is largely I don't know as I have never actually used
the Visual Studio setup project type.

Unfortunately, NuGet does not have official support for including native
code with a package, see:

https://nuget.codeplex.com/workitem/679

The System.Data.SQLite project uses the best practices workaround for this
lack of native code support; however, it is not perfect.  It relies on
treating the native code libraries as content and having a small
PowerShell script add them to the project file as such.

The NuGet package for System.Data.SQLite is only intended to support
app-local deployment and in that case it works just fine.  Supporting
anything more would require extra tooling support from NuGet.

--
Joe Mistachkin

___
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] Building System.Data.SQLite

2012-08-14 Thread Bernhard Mogens Ege
I was referencing C:\Program Files
(x86)\System.Data.SQLite\2010\bin\System.Data.SQLite.dll is this was the one
shown in the VS2010-Project-Add Reference-.NET section.

I removed that reference and added a reference to C:\Program
Files\System.Data.SQLite\2010\bin\System.Data.SQLite.dll instead. This
worked as intended.

Why is VS2010 only showing x86 references in .NET section of the Add
Reference browser? My project is targetted Any CPU, but I have tried x86
and x64 but neither worked with C:\Program Files
(x86)\System.Data.SQLite\2010\bin\System.Data.SQLite.dll

Anyway, it  works and that is great. :)

The old-school dll hell is easier to make sense of than the .NET dll hell.
:-P
-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 14. august 2012 00:19
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Building System.Data.SQLite


Bernhard Mogens Ege wrote:
 
 This doesn't appear to build everything needed as when I install the
bundles
 (x86 and x64), nothing is added to the global assembly cache in 
 C:\windows\assembly\ (did ask the installer to add to the GAC), making
every
 binary using System.Data.SQLite fail. The files are put into 
 C:\Program Files\.. as expected, though, but binaries do not know to look
there.
 

Installing the System.Data.SQLite DLLs in the GAC is not normally
recommended.
Instead, they should probably be installed along side the application
binaries (i.e. app-local).  Setting a reference to the managed (or
mixed-mode) assembly for System.Data.SQLite is normally all that is required
to make the applications work as the DLL should then automatically be copied
to the build output directory.

If you have Visual Studio 2010, then you may want to look into using the
official NuGet package for System.Data.SQLite, seen here:

http://nuget.org/packages/System.Data.SQLite

 
 Also, the Designer adding for VS2010 isn't working properly as it 
 isn't possible to enter a path with a space in it (Illegal sharacters 
 in path.), making the VS addin a no-go. This is a quite annoying error 
 which makes it very difficult for me to modify my sqlite models; close 
 all VS2010, remove sqlite 1.0.82.0, possibly reboot, install 1.0.81.0 
 incl. VS plugin, start
 vs2010 and load my project, modify my sqlite model, close vs2010,
uninstall
 1.0.81.0, possibly reboot, install 1.0.82.0, start and load my 
 project, test, continue programming. Maybe I can just use the 
 Designer.dll from
 1.0.81.0 with the rest from 1.0.82.0? That would be worth a try.
 

The designer components are a bit tricky to get working right, even in the
best of circumstances.  They actually *do* require the setup package be run
in order to operate properly.  Also, since Visual Studio is always a 32-bit
native application, that setup package is the one that must be used.  Here
is the direct link to the correct package:

http://system.data.sqlite.org/downloads/1.0.81.0/sqlite-netFx40-setup-bundle
-x86-2010-1.0.81.0.exe

--
Joe Mistachkin

___
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] Building System.Data.SQLite

2012-08-14 Thread Bernhard Mogens Ege
Regarding the Designer and the must-not-use-space-in-filenames problem, I
ended up using the 8.3 filename of the folder having the space in it.
(Visual Studio 2010 - Visual~1)

The Designer source for 1.0.81.0 seems to be the same as 1.0.82.0 so both
would error on this space. The difference most likely is in
System.Data.SQLite itself (SQLiteConnection.cs) but while I have looked at
the source, I didn't find the actual error.

I'll use my workaround for the time being. This is just the GUI in VS2010
acting up.

When building my own connection string in my project, I can use spaces in
filenames without problems. 
-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 14. august 2012 00:19
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Building System.Data.SQLite


Bernhard Mogens Ege wrote:
 
 This doesn't appear to build everything needed as when I install the
bundles
 (x86 and x64), nothing is added to the global assembly cache in 
 C:\windows\assembly\ (did ask the installer to add to the GAC), making
every
 binary using System.Data.SQLite fail. The files are put into 
 C:\Program Files\.. as expected, though, but binaries do not know to look
there.
 

Installing the System.Data.SQLite DLLs in the GAC is not normally
recommended.
Instead, they should probably be installed along side the application
binaries (i.e. app-local).  Setting a reference to the managed (or
mixed-mode) assembly for System.Data.SQLite is normally all that is required
to make the applications work as the DLL should then automatically be copied
to the build output directory.

If you have Visual Studio 2010, then you may want to look into using the
official NuGet package for System.Data.SQLite, seen here:

http://nuget.org/packages/System.Data.SQLite

 
 Also, the Designer adding for VS2010 isn't working properly as it 
 isn't possible to enter a path with a space in it (Illegal sharacters 
 in path.), making the VS addin a no-go. This is a quite annoying error 
 which makes it very difficult for me to modify my sqlite models; close 
 all VS2010, remove sqlite 1.0.82.0, possibly reboot, install 1.0.81.0 
 incl. VS plugin, start
 vs2010 and load my project, modify my sqlite model, close vs2010,
uninstall
 1.0.81.0, possibly reboot, install 1.0.82.0, start and load my 
 project, test, continue programming. Maybe I can just use the 
 Designer.dll from
 1.0.81.0 with the rest from 1.0.82.0? That would be worth a try.
 

The designer components are a bit tricky to get working right, even in the
best of circumstances.  They actually *do* require the setup package be run
in order to operate properly.  Also, since Visual Studio is always a 32-bit
native application, that setup package is the one that must be used.  Here
is the direct link to the correct package:

http://system.data.sqlite.org/downloads/1.0.81.0/sqlite-netFx40-setup-bundle
-x86-2010-1.0.81.0.exe

--
Joe Mistachkin

___
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] Building System.Data.SQLite

2012-08-13 Thread Bernhard Mogens Ege
The suggested command did create the win32 setup for me, but I'd also like
the x64 setup and this replaced:

set_Release_x86_2010.bat

with

set_Release_x64_2010.bat

and build again. This however also build the x86 target for some reason and
no x64 setup file is produced (bake fails, complaining about missing x64
files).

Can I install something that would make the whole build complete without
having VS2008? Seems this is the easiest way, short of decoding all the bat
files for their meaning.

-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 10. august 2012 19:01
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Building System.Data.SQLite


Bernhard Mogens Ege wrote:

 I have been looking at
 https://system.data.sqlite.org/index.html/doc/trunk/www/build.wiki to
build
 System.Data.SQLite

https://system.data.sqlite.org/index.html/doc/trunk/www/build.wiki%20to%20b
 uild%20System.Data.SQLite  but when using the manual build, I do not 
 get the setup files built..
 

The setup packages are created using Inno Setup, an open source tool
available
here:

http://www.jrsoftware.org/

Once that tool is installed, the Setup\bake*.bat tools may be used to
build the setup packages for System.Data.SQLite.  Various other batch files
in that same directory contain the environment variable settings needed by
these tools.

 
 Then I use the automated build and follow the steps which work fine 
 until step 11: bake_all.bat that complains about:
 
 Could not bake setup for Release/x86/2008.
 

The bake_all.bat tool assumes that binaries have been built for all
supported platforms and framework versions.  When that is not the case, the
bake.bat
tool may be used instead.  However, that tool is a bit more complex because
it was not really intended to be called directly from the command line.

Here is an example that will build the setup using the .NET 4.0-based setup
for
x86 (this assumes that the build.bat tool already completed successfully):

CD /D %ROOT%\Setup
vsSp.bat
set_common.bat
set_Release_x86_2010.bat
bake.bat

--
Joe Mistachkin

___
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] Building System.Data.SQLite

2012-08-13 Thread Bernhard Mogens Ege
But I did use build.bat after using set_Release_x64_2010.bat. This is what
is so strange.

Build_all.bat fails as it seems vsSp.bat detects that I have VS2008
installed, but this is installed by SQL 2008 R2 and lacks pretty much
everything (used for business intelligence design only and has no C#/C++
compiler).

I looked closer at build_all.bat and ended up with these commands that
created the 2010 Win32/x64 setup files:

SET YEARS=2010
Build_all.bat
Bake_all.bat

This seems to have made the build system skip the VS2008 generation
completely and without errors, but I am not certain it is a safe way to do
it (seems so, though).

Final question: what is the difference between the bundle and non-bundle
setup files? I tried viewing the download page but I cannot view it. I only
get the About wiki page. I tried Firefox, Opera, Chrome and IE9 and none of
them could show the download page.

Cheers,

Bernhard 

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 13. august 2012 11:51
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Building System.Data.SQLite


Bernhard Mogens Ege wrote:
 
 This however also build the x86 target for some reason and no x64 
 setup file is produced (bake fails, complaining about missing x64 files).
 
 
This means that the x64 binaries were not built first using build.bat.

You should be able to build binaries for all supported platforms and
versions of Visual Studio (as installed on your box) by making use of the
build_all.bat tool instead.

 
 Can I install something that would make the whole build complete 
 without having VS2008? Seems this is the easiest way, short of 
 decoding all the bat files for their meaning.
 

With the exception of the Visual Studio designer integration components,
there is nothing really to install, per se.  In fact, it is very highly
recommended that the deployment of the System.Data.SQLite DLL and related
components be done on an app-local basis, with the GAC being avoided
altogether.

--
Joe Mistachkin

___
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] Building System.Data.SQLite

2012-08-13 Thread Bernhard Mogens Ege
This doesn't appear to build everything needed as when I install the bundles
(x86 and x64), nothing is added to the global assembly cache in
C:\windows\assembly\ (did ask the installer to add to the GAC), making every
binary using System.Data.SQLite fail. The files are put into C:\Program
Files\.. as expected, though, but binaries do not know to look there.

Also, the Designer adding for VS2010 isn't working properly as it isn't
possible to enter a path with a space in it (Illegal sharacters in path.),
making the VS addin a no-go. This is a quite annoying error which makes it
very difficult for me to modify my sqlite models; close all VS2010, remove
sqlite 1.0.82.0, possibly reboot, install 1.0.81.0 incl. VS plugin, start
vs2010 and load my project, modify my sqlite model, close vs2010, uninstall
1.0.81.0, possibly reboot, install 1.0.82.0, start and load my project,
test, continue programming. Maybe I can just use the Designer.dll from
1.0.81.0 with the rest from 1.0.82.0? That would be worth a try.

This is getting a bit difficult for me to solve. :-/
-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bernhard Mogens Ege
Sent: 13. august 2012 12:32
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Building System.Data.SQLite

But I did use build.bat after using set_Release_x64_2010.bat. This is what
is so strange.

Build_all.bat fails as it seems vsSp.bat detects that I have VS2008
installed, but this is installed by SQL 2008 R2 and lacks pretty much
everything (used for business intelligence design only and has no C#/C++
compiler).

I looked closer at build_all.bat and ended up with these commands that
created the 2010 Win32/x64 setup files:

SET YEARS=2010
Build_all.bat
Bake_all.bat

This seems to have made the build system skip the VS2008 generation
completely and without errors, but I am not certain it is a safe way to do
it (seems so, though).

Final question: what is the difference between the bundle and non-bundle
setup files? I tried viewing the download page but I cannot view it. I only
get the About wiki page. I tried Firefox, Opera, Chrome and IE9 and none of
them could show the download page.

Cheers,

Bernhard 

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 13. august 2012 11:51
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Building System.Data.SQLite


Bernhard Mogens Ege wrote:
 
 This however also build the x86 target for some reason and no x64 
 setup file is produced (bake fails, complaining about missing x64 files).
 
 
This means that the x64 binaries were not built first using build.bat.

You should be able to build binaries for all supported platforms and
versions of Visual Studio (as installed on your box) by making use of the
build_all.bat tool instead.

 
 Can I install something that would make the whole build complete 
 without having VS2008? Seems this is the easiest way, short of 
 decoding all the bat files for their meaning.
 

With the exception of the Visual Studio designer integration components,
there is nothing really to install, per se.  In fact, it is very highly
recommended that the deployment of the System.Data.SQLite DLL and related
components be done on an app-local basis, with the GAC being avoided
altogether.

--
Joe Mistachkin

___
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


[sqlite] Building System.Data.SQLite

2012-08-10 Thread Bernhard Mogens Ege
I have been looking at
https://system.data.sqlite.org/index.html/doc/trunk/www/build.wiki to build
System.Data.SQLite
https://system.data.sqlite.org/index.html/doc/trunk/www/build.wiki%20to%20b
uild%20System.Data.SQLite  but when using the manual build, I do not get
the setup files built..

 

Then I use the automated build and follow the steps which work fine until
step 11: bake_all.bat that complains about:

 

Could not bake setup for Release/x86/2008.

 

Apparently, the 2008 files aren't built which is reasonable as I do not have
VS2008.

 

I have looked at some of the bat files, but I am not sure what the correct
path to build Win32/x64 files for VS2010 is (including Designer).

 

Any inside knowledge?

 

-- 

Bernhard

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


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-26 Thread Bernhard Mogens Ege
Ah, so it does! I obviously misread your previous suggestion that was spot
on.

And now it certainly works, memory db with shared cache in
System.Data.SQLite. :)

Thank you for your help. :)

-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 25. juli 2012 22:04
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll


Please use the following and try again:

con.ProviderConnectionString = FullUri=file::memory:?cache=shared;;

The FullUri property supersedes the Data Source property.

--
Joe Mistachkin

___
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] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Bernhard Mogens Ege
Thank you for the suggestion.

But my binary keeps loading the System.Data.SQLite from the GAC instead of
from the project (I added a reference to the DLL from the System.Data.SQLite
project, seemed like the way to do it).

The dll hell is even worse in .NET. :-/

Has _anyone_ made :memory:;cache=shared work in C#/System.Data.SQLite?

The unreleased 1.0.82.0 doesn't work. 1.0.81.0 with 3.7.13 doesn't work. I
wonder what I am missing. :-/
-- 
Bernhard

-Original Message-
From: J Decker [mailto:d3c...@gmail.com] 
Sent: 24. juli 2012 02:49
To: b...@saseco.dk; General Discussion of SQLite Database
Subject: Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

On Mon, Jul 23, 2012 at 3:04 AM, Bernhard Mogens Ege b...@saseco.dk wrote:
 I am trying to figure out how to compile System.Data.SQLite and in the 
 process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared 
 cache option for memory connections.



 And when I write 'trying' I am having trouble figuring out where 
 exactly System.Data.SQLite picks up sqlite3.dll from. The source code 
 doesn't include it and the installer also doesn't include it, but it 
 must be somewhere.


It is in there in 1.0.80.0\SQLite.Interop\src\core\sqlite3.c

You need 3 projects, the netmodule, the static sqlite library and the
system.data.sqlite project

1.0.80.0\System.Data.SQLite\System.Data.SQLite.Module.2010.csproj
1.0.80.0\SQLite.Interop\SQLite.Interop.Static.2010.vcxproj
1.0.80.0\System.Data.SQLite\System.Data.SQLite.2010.csproj

interop must depend on module
system.data.sqlite must depend on interop  (right click on a project and use
'Project Dependencies' to add the additional dependencies)

Then you can just reference system.data.sqlite.2010 in other projects

Turn off generate XML documentation in build tab of project properties of
system.data.sqlite.module project.  (otherwise it causes it to always
rebuild, and in turn all dependants of it)

Probably similar rules for more recent versions

That is if you want to include building from source in your project;
otherwise you can just use the default solution of sqlite to build a DLL and
add that as the reference.



 Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
 3.7.13 and will the shared cache feature work?



 Also, compiling System.Data.SQLite for .NET 4.0 results in some 
 warnings/errors. Are they safe to ignore?



 Warning1   The parent file, 'SR.resx',
 for file 'SR.Designer.cs' cannot be found in the project file.
 System.Data.SQLite.2010

 Warning2   Load of property
'OutputType'
 failed.System.Data.SQLite.Module.2010

 Warning3   The parent file, 'SR.resx',
 for file 'SR.Designer.cs' cannot be found in the project file.
 System.Data.SQLite.Module.2010

 Warning4   Error 2005: Mapping
 Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its 
 referential integrity constraint provides sufficient information.  You 
 can safely delete the mapping information for this association.
 C:\Users\bme\Documents\Visual Studio

2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
 793  800  testlinq.2010

 Warning5   Error 2005: Mapping
 Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its 
 referential integrity constraint provides sufficient information.  You 
 can safely delete the mapping information for this association.
 C:\Users\bme\Documents\Visual Studio

2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
 801  809  testlinq.2010

 Warning6   Error 2005: Mapping
 Association 'FK_OrderDetails_ProductID_ProductID' is redundant: Its 
 referential integrity constraint provides sufficient information.  You 
 can safely delete the mapping information for this association.
 C:\Users\bme\Documents\Visual Studio

2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
 810  818  testlinq.2010

 Warning7   The referenced component
 'mscorlib' could not be found.

 Warning8   The referenced component
 'mscorlib' could not be found.



 --

 Bernhard

 ___
 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] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Bernhard Mogens Ege
I have now done nearly exactly as you wrote, with these differences:

I have added the project System.Data.SQLite.Linq.2010 as well and made it
depend on System.Data.SQLite.2010.

I did not disable the XML generation.

I made my project depend on System.Data.SQLite.2010 and
System.Data.SQLite.Linq.2010.

I can build the project just fine, but I cannot run it. I get this error:

Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. ---
System.ArgumentException: The specified store provider cannot be found in
the configuration, or is not valid. --- System.ArgumentException: Unable to
find the requested .Net Framework Data Provider.  It may not be installed.
at System.Data.Common.DbProviderFactories.GetFactory(String
providerInvariantName)   at
System.Data.EntityClient.EntityConnection.GetFactory(String providerString)

I have no other System.Data.SQLite installed on my system and hence the GAC
is does not contain SQLite.

Do I need to do something special for the actual code from SQLite to be
included in my project (i.e. 1 assembly or referenced dlls)?

-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bernhard Mogens Ege
Sent: 23. juli 2012 12:05
To: sqlite-users@sqlite.org
Subject: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

I am trying to figure out how to compile System.Data.SQLite and in the
process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache
option for memory connections.

 

And when I write 'trying' I am having trouble figuring out where exactly
System.Data.SQLite picks up sqlite3.dll from. The source code doesn't
include it and the installer also doesn't include it, but it must be
somewhere.

 

Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
3.7.13 and will the shared cache feature work?

 

Also, compiling System.Data.SQLite for .NET 4.0 results in some
warnings/errors. Are they safe to ignore?

 

Warning1   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.2010

Warning2   Load of property 'OutputType'
failed.System.Data.SQLite.Module.2010

Warning3   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.Module.2010

Warning4   Error 2005: Mapping
Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
793  800  testlinq.2010

Warning5   Error 2005: Mapping
Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its referential
integrity constraint provides sufficient information.  You can safely delete
the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
801  809  testlinq.2010

Warning6   Error 2005: Mapping
Association 'FK_OrderDetails_ProductID_ProductID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
810  818  testlinq.2010

Warning7   The referenced component
'mscorlib' could not be found.

Warning8   The referenced component
'mscorlib' could not be found.

 

-- 

Bernhard

___
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] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-24 Thread Bernhard Mogens Ege
Finally made it work, but still not automatic...

I added those projects from 1.0.81.0 but their resulting DLLs weren't copied
to the target directory. I don't know why. I could copy them manually there,
though. The DLL from SQLite.Interop.2010 was named System.Data.SQLite.dll
and I had to manually rename it to SQLite.Interop.dll and copy it to the
target directory. I kind of expected this to happen automatically. :-/

I also added SQLite.Designer.2010.

And I had to add this to my app.config:

configuration
  system.data
DbProviderFactories
  remove invariant=System.Data.SQLite/
  add name=SQLite Data Provider invariant=System.Data.SQLite
description=.Net Framework Data Provider for SQLite
type=System.Data.SQLite.SQLiteFactory, System.Data.SQLite /
/DbProviderFactories
  /system.data
/configuration

Once I did that, my application finally could talk with SQLite 3.7.13! :D

But, alas, shared cache functionality was not available.

I guess I have to revert to using file-based sqlite3 and accept sluggish
performance. For now. At least I hope we get shared memory sqlite3 databases
for C# soon. :)

Seeing as the already tried things didn't work, I might as well revert to
the standard compiled distribution. At least it is less of a hassle to work
with. :-P
-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bernhard Mogens Ege
Sent: 24. juli 2012 14:43
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

I have now done nearly exactly as you wrote, with these differences:

I have added the project System.Data.SQLite.Linq.2010 as well and made it
depend on System.Data.SQLite.2010.

I did not disable the XML generation.

I made my project depend on System.Data.SQLite.2010 and
System.Data.SQLite.Linq.2010.

I can build the project just fine, but I cannot run it. I get this error:

Unhandled Exception: System.Reflection.TargetInvocationException: Exception
has been thrown by the target of an invocation. ---
System.ArgumentException: The specified store provider cannot be found in
the configuration, or is not valid. --- System.ArgumentException: Unable to
find the requested .Net Framework Data Provider.  It may not be installed.
at System.Data.Common.DbProviderFactories.GetFactory(String
providerInvariantName)   at
System.Data.EntityClient.EntityConnection.GetFactory(String providerString)

I have no other System.Data.SQLite installed on my system and hence the GAC
is does not contain SQLite.

Do I need to do something special for the actual code from SQLite to be
included in my project (i.e. 1 assembly or referenced dlls)?

--
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bernhard Mogens Ege
Sent: 23. juli 2012 12:05
To: sqlite-users@sqlite.org
Subject: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

I am trying to figure out how to compile System.Data.SQLite and in the
process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache
option for memory connections.

 

And when I write 'trying' I am having trouble figuring out where exactly
System.Data.SQLite picks up sqlite3.dll from. The source code doesn't
include it and the installer also doesn't include it, but it must be
somewhere.

 

Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
3.7.13 and will the shared cache feature work?

 

Also, compiling System.Data.SQLite for .NET 4.0 results in some
warnings/errors. Are they safe to ignore?

 

Warning1   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.2010

Warning2   Load of property 'OutputType'
failed.System.Data.SQLite.Module.2010

Warning3   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.Module.2010

Warning4   Error 2005: Mapping
Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
793  800  testlinq.2010

Warning5   Error 2005: Mapping
Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its referential
integrity constraint provides sufficient information.  You can safely delete
the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
801  809  testlinq.2010

Re: [sqlite] System.Data.SQLite, Linq, multithread and transaction usage

2012-07-23 Thread Bernhard Mogens Ege
Hmm the documentation doesn't explain how I should proceed with an entity
object. 

Is it enough to close the connection in the entity object and let the
framework open/close the connection for me?

In constructor:
MyEntities myEntities = new MyEntities(connectionString); 

In each thread:
myEntities.Connection.Open();
Do stuff, including transactions...
myEntities.Connection.Close();

Or should I create/dispose whole entity objects instead (and the connection
with it)?

In each thread:
MyEntities myEntities = new MyEntities(connectionString);
Do stuff, including transactions...
myEntities.Dispose();

I guess the latter as it would probably get its own connection object, but I
am not quite sure here (ADO.NET might do connection sharing).

-- 
Bernhard

-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Joe Mistachkin
Sent: 20. juli 2012 23:00
To: 'General Discussion of SQLite Database'
Subject: Re: [sqlite] System.Data.SQLite, Linq, multithread and transaction
usage


The basic thread-safety rules of System.Data.SQLite are documented here:

https://system.data.sqlite.org/index.html/artifact?ci=trunkfilename=Doc/Ext
ra/limitations.html

--
Joe Mistachkin

___
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] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-23 Thread Bernhard Mogens Ege
I am trying to figure out how to compile System.Data.SQLite and in the
process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache
option for memory connections.

 

And when I write 'trying' I am having trouble figuring out where exactly
System.Data.SQLite picks up sqlite3.dll from. The source code doesn't
include it and the installer also doesn't include it, but it must be
somewhere.

 

Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
3.7.13 and will the shared cache feature work?

 

Also, compiling System.Data.SQLite for .NET 4.0 results in some
warnings/errors. Are they safe to ignore?

 

Warning1   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.2010

Warning2   Load of property 'OutputType'
failed.System.Data.SQLite.Module.2010

Warning3   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.Module.2010

Warning4   Error 2005: Mapping
Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
793  800  testlinq.2010

Warning5   Error 2005: Mapping
Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its referential
integrity constraint provides sufficient information.  You can safely delete
the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
801  809  testlinq.2010

Warning6   Error 2005: Mapping
Association 'FK_OrderDetails_ProductID_ProductID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
810  818  testlinq.2010

Warning7   The referenced component
'mscorlib' could not be found.

Warning8   The referenced component
'mscorlib' could not be found.

 

-- 

Bernhard

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


Re: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

2012-07-23 Thread Bernhard Mogens Ege
Well, I ended up trying with 1.0.82.0 as it is now in the repository, and
followed the build instructions (which need to be updated ) to generate new
dll's with 3.7.14 (as it turns out) included.

But I still cannot use the filename syntax (I can use, but it seems to be
ignored as I get an empty db everytime I open the connection): 

:memory:;cache=shared

Is shared memory database unsupported in System.Data.SQLite?

I am keeping a connection open to the database, but I cannot reach it from
other :memory:;cache=shared connections.

I realize this probably should be a developer question, but I hope someone
here has the answer before I attempt on the dev list.

-- 
Bernhard


-Original Message-
From: sqlite-users-boun...@sqlite.org
[mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bernhard Mogens Ege
Sent: 23. juli 2012 12:05
To: sqlite-users@sqlite.org
Subject: [sqlite] Compiling System.Data.SQLite with latest sqlite3.dll

I am trying to figure out how to compile System.Data.SQLite and in the
process update sqlite from 3.7.12.1 to 3.7.13 as I need the shared cache
option for memory connections.

 

And when I write 'trying' I am having trouble figuring out where exactly
System.Data.SQLite picks up sqlite3.dll from. The source code doesn't
include it and the installer also doesn't include it, but it must be
somewhere.

 

Is it even safe to update System.Data.SQLite 1.0.81.0 with sqlite3.dll
3.7.13 and will the shared cache feature work?

 

Also, compiling System.Data.SQLite for .NET 4.0 results in some
warnings/errors. Are they safe to ignore?

 

Warning1   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.2010

Warning2   Load of property 'OutputType'
failed.System.Data.SQLite.Module.2010

Warning3   The parent file, 'SR.resx',
for file 'SR.Designer.cs' cannot be found in the project file.
System.Data.SQLite.Module.2010

Warning4   Error 2005: Mapping
Association 'FK_InternationalOrders_OrderID_OrderID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
793  800  testlinq.2010

Warning5   Error 2005: Mapping
Association 'FK_OrderDetails_OrderID_OrderID' is redundant: Its referential
integrity constraint provides sufficient information.  You can safely delete
the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
801  809  testlinq.2010

Warning6   Error 2005: Mapping
Association 'FK_OrderDetails_ProductID_ProductID' is redundant: Its
referential integrity constraint provides sufficient information.  You can
safely delete the mapping information for this association.
C:\Users\bme\Documents\Visual Studio
2010\Projects\sqlite-netFx-source-1.0.81.0\testlinq\NorthwindModel2010.edmx
810  818  testlinq.2010

Warning7   The referenced component
'mscorlib' could not be found.

Warning8   The referenced component
'mscorlib' could not be found.

 

-- 

Bernhard

___
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