home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
VB .NET Plugin: sqlite.dll Error
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="samuel337" data-source="post: 7078" data-attributes="member: 10347"><p>Nope, you can use it without any changes.</p><p></p><p>The keyword is <strong>static</strong>. In VB.NET lingo, this translates to <strong>shared</strong>. </p><p></p><p>Therefore, this class cannot be and doesn't need to be instantiated because there can only ever be one instance of it - its singleton.</p><p></p><p>To access the methods, simply go MediaPortal.TV.Database.TVDatabase.AddRecording or whatever.</p><p></p><p>Keep in mind that the method can only ever be accessed by one call at a time, shown by the <em>lock (typeof(TVDatabase))</em> statement. So if MP happens to be using the TVdatabase, then your plugin will have to wait until MP finishes before you can use it.</p><p></p><p>The database itself however does allow multiple user access, so if you want to can connect directly to the database file. BTW, if you do choose this way and you want to use ADO.NET work SQLite, there is a dll that lets you do this. See <a href="http://sourceforge.net/projects/adodotnetsqlite" target="_blank">http://sourceforge.net/projects/adodotnetsqlite</a>.</p><p></p><p>Sam</p></blockquote><p></p>
[QUOTE="samuel337, post: 7078, member: 10347"] Nope, you can use it without any changes. The keyword is [b]static[/b]. In VB.NET lingo, this translates to [b]shared[/b]. Therefore, this class cannot be and doesn't need to be instantiated because there can only ever be one instance of it - its singleton. To access the methods, simply go MediaPortal.TV.Database.TVDatabase.AddRecording or whatever. Keep in mind that the method can only ever be accessed by one call at a time, shown by the [i]lock (typeof(TVDatabase))[/i] statement. So if MP happens to be using the TVdatabase, then your plugin will have to wait until MP finishes before you can use it. The database itself however does allow multiple user access, so if you want to can connect directly to the database file. BTW, if you do choose this way and you want to use ADO.NET work SQLite, there is a dll that lets you do this. See [url]http://sourceforge.net/projects/adodotnetsqlite[/url]. Sam [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
VB .NET Plugin: sqlite.dll Error
Contact us
RSS
Top
Bottom