NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 49 50 51 52 53 … 93 Next »
OT SQlite DBProviderFactories

 
  • 0 Vote(s) - 0 Average
OT SQlite DBProviderFactories
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#1
2006-10-11, 04:51 PM
Sub, kind of OffTopic to GBPVR.

GBPVR uses System.data.common.dbproviderfactories to provide an abstract app that does not need to be changed if one chooses MS access vs SQLite.

Does the system.data.sqlite.dll file that gets installed on the gbpvr folder register itself on the .net 2.0 framework Db Provider Factories ? or is it registered by the MSI Installation file ?

Basically I would like to port an application to use db provider factories that go from Sqlite or Mysql or MS Sql Server, so I do not have to rewrite the entire application, just like you did with GBPVR.

Hopefully , the MSI takes care of registering sqlite. I now I did not need to install anything extra on my GBPVR server to use sqlite.

Thanks for your support.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#2
2006-10-11, 04:56 PM
Quote:Does the system.data.sqlite.dll file that gets installed on the gbpvr folder register itself on the .net 2.0 framework Db Provider Factories ? or is it registered by the MSI Installation file ?
GB-PVR doesnt require it to be registered at all, because I'm supplying the DLL with the runtime, I just have a reference to the DLL in my project.
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#3
2006-10-11, 05:51 PM
sub Wrote:GB-PVR doesnt require it to be registered at all, because I'm supplying the DLL with the runtime, I just have a reference to the DLL in my project.

When you say reference , you mean a reference on the "IDE->Project->Add Reference..." or some C# code that hardcodes this reference, something like

system.data.common.DbFactories.Add ("c:\program files\devnz\gbpvr\system.data.sqlite.dll") (I am making this up )
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#4
2006-10-11, 06:06 PM
Quote:When you say reference , you mean a reference on the "IDE->Project->Add Reference..." or some C# code that hardcodes this reference
Yep. I knew this DLL was always going to present, and was going to be used by the majority of users, so it was an acceptable way to do it.
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#5
2006-10-11, 06:16 PM
sub Wrote:Yep. I knew this DLL was always going to present, and was going to be used by the majority of users, so it was an acceptable way to do it.

So, the reference is added on the Project->Add references and therefore is exported on the filnal MSI Executable that you distribute ?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#6
2006-10-11, 06:24 PM
fvfv Wrote:So, the reference is added on the Project->Add references and therefore is exported on the filnal MSI Executable that you distribute ?
I dont understand what you mean. Its just distributed like any other DLL (for example, the same as GBPVRPublic.DLL). As long as .NET can resolve the dependency (ie, DLL in same directory as other GB-PVR binaries), then it'll work.
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#7
2006-10-11, 06:46 PM
Thanks Sub. I guess I only need to put the dll in my App Directory and that should do it.

Well, to be fair with Microsoft, I guess this is a major step forward for them regarding their infamous DLL Hell problems of the past.
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#8
2006-10-12, 04:50 PM
Sub. Thanks for your help. Originally I did not quite understand what ("As long as .NET can resolve the dependency, IE DLL in the same directory" ) meant. It means that it needs to be distributed as "Local Copy".

It took me a while to figure out how to accomplish that. On the VS Studio.NET Solution Explorer, Expand "References", locate the DLL in question and under properties set "Copy Local" to True. It was False by default.

Now , when publishing the application, the DLL gets copied alongside the app and it does not need to be registered.

Thanks again.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#9
2006-10-12, 05:00 PM
Quote:Sub. Thanks for your help. Originally I did not quite understand what ("As long as .NET can resolve the dependency, IE DLL in the same directory" ) meant. It means that it needs to be distributed as "Local Copy".

It took me a while to figure out how to accomplish that. On the VS Studio.NET Solution Explorer, Expand "References", locate the DLL in question and under properties set "Copy Local" to True. It was False by default.
Actually thats not really want I meant, but it achieves the same thing. On my project I have reference to this DLL, but I dont have copy local set to true, but when I deploy the app with my MSI installer I do install the DLL in the GB-PVR directory so it can resolve the dependency.

'Copy Local' is more of a development thing than a deployment thing. If you using Visual Studio to do you deployment, it may be also be relevent. I dont use Visual Studio for this.
fvfv
Offline

Member

Posts: 131
Threads: 20
Joined: Nov 2005
#10
2006-10-12, 05:12 PM
sub Wrote:Actually thats not really want I meant, but it achieves the same thing. On my project I have reference to this DLL, but I dont have copy local set to true, but when I deploy the app with my MSI installer I do install the DLL in the GB-PVR directory so it can resolve the dependency.

'Copy Local' is more of a development thing than a deployment thing. If you using Visual Studio to do you deployment, it may be also be relevent. I dont use Visual Studio for this.

Just as curiosity, what tool do you use to create the MSI Installer ?

I tried the one included with Visual Studio 2005 and it seems to suck as it does not check for dependencies. It just lets you add files at random and when you try to execute the MSI on the users's machine, it fails miserably.

My Old VB6 Apps worked great with MS Visual Studio 6 Installer.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  SkipTool, do you use the GBPVR SQLite database? mkenyon2 1 1,633 2008-04-21, 07:30 PM
Last Post: pastro
  Export Metadata per recording using SQLite dinki 5 2,379 2007-08-10, 07:51 PM
Last Post: dinki
  how to access gbpvr.db3 file using SQLite Wakalaka 20 7,645 2007-05-11, 12:28 AM
Last Post: zehd
  SQLite vs Access query differences fla 6 5,221 2007-02-05, 09:07 PM
Last Post: psycik
  SQLite GUI-based admin & query building? Braklet 3 1,982 2006-10-30, 02:45 PM
Last Post: Braklet
  Plugin Development Question - SQLite Database Carlito 2 1,378 2006-10-21, 02:41 AM
Last Post: Carlito
  ScheduleHelper.LoadRecordingSchedule() and SQLite database locks alibert 0 1,283 2006-05-23, 05:36 PM
Last Post: alibert

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode