Oooo ... that's annoying.
-
I'm starting to write an app which can work online or offline by syncing with a remote SQL DB and using either that or a local SqLite DB if it isn't. So, the SqLite stuff is in a separate assembly (in case I want to use Access, or whatever instead later) and the main app shouldn't know what is working. But ... you try to run it, and it collapses because it can't find the Interop DLL. Solution? Add reference support for SqLite to the main app because the stupid thing uses the startup assembly for details and not the current one. Bah! Stupid!
Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
I'm starting to write an app which can work online or offline by syncing with a remote SQL DB and using either that or a local SqLite DB if it isn't. So, the SqLite stuff is in a separate assembly (in case I want to use Access, or whatever instead later) and the main app shouldn't know what is working. But ... you try to run it, and it collapses because it can't find the Interop DLL. Solution? Add reference support for SqLite to the main app because the stupid thing uses the startup assembly for details and not the current one. Bah! Stupid!
Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
If it were me... I would probably have the user install SQL Server Express if they want a local db for fail-over. At that point, all you have to do is change the connection string in your app, and Bob's your uncle. None of the code changes. Of course, if the user doesn't want to install Express, he doesn't get a fail-over db, but you could put that choice on the user's shoulders. ...if it were me.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013 -
I'm starting to write an app which can work online or offline by syncing with a remote SQL DB and using either that or a local SqLite DB if it isn't. So, the SqLite stuff is in a separate assembly (in case I want to use Access, or whatever instead later) and the main app shouldn't know what is working. But ... you try to run it, and it collapses because it can't find the Interop DLL. Solution? Add reference support for SqLite to the main app because the stupid thing uses the startup assembly for details and not the current one. Bah! Stupid!
Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
I'm using sql CE on a couple of personal apps and it works well...single file password protected, just no views for some obscure reason. :confused: One other strange limitation is the inability to host it on a network share. :| At least it doesn't require interop.
"Go forth into the source" - Neal Morse
-
If it were me... I would probably have the user install SQL Server Express if they want a local db for fail-over. At that point, all you have to do is change the connection string in your app, and Bob's your uncle. None of the code changes. Of course, if the user doesn't want to install Express, he doesn't get a fail-over db, but you could put that choice on the user's shoulders. ...if it were me.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013The SqLite choice was for possible future compatibility with Android where it's pretty much standard. At this stage it's proof of concept stuff to avoid full DB replication and archival with encryption thrown in for fun and games. If that lot works I can start thinking about UI / OS ...
Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
I'm starting to write an app which can work online or offline by syncing with a remote SQL DB and using either that or a local SqLite DB if it isn't. So, the SqLite stuff is in a separate assembly (in case I want to use Access, or whatever instead later) and the main app shouldn't know what is working. But ... you try to run it, and it collapses because it can't find the Interop DLL. Solution? Add reference support for SqLite to the main app because the stupid thing uses the startup assembly for details and not the current one. Bah! Stupid!
Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
OriginalGriff wrote:
But ... you try to run it, and it collapses because it can't find the Interop DLL.
AppDomain.AssemblyResolve[^] to the rescue!
Latest Article - Web Frameworks - A Solution Looking for a Problem? Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
-
I'm starting to write an app which can work online or offline by syncing with a remote SQL DB and using either that or a local SqLite DB if it isn't. So, the SqLite stuff is in a separate assembly (in case I want to use Access, or whatever instead later) and the main app shouldn't know what is working. But ... you try to run it, and it collapses because it can't find the Interop DLL. Solution? Add reference support for SqLite to the main app because the stupid thing uses the startup assembly for details and not the current one. Bah! Stupid!
Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
I prefer to load database support assemblies dynamically upon request. :cool: For a system I've had on the back burner for nearly a decade, I'm considering SQL Server CE as a portable* alternative to SQL Server (including Express) * Have everything on a flash drive; no server required, no installation.
-
OriginalGriff wrote:
But ... you try to run it, and it collapses because it can't find the Interop DLL.
AppDomain.AssemblyResolve[^] to the rescue!
Latest Article - Web Frameworks - A Solution Looking for a Problem? Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
Oooh, Me like that! :thumbsup: I've always been pissed when an application refuses to start and you don't know what assembly it is missing to do so! :mad: Thanks a lot for the link Marc!
Anything that is unrelated to elephants is irrelephant
Anonymous
-----
The problem with quotes on the internet is that you can never tell if they're genuine
Winston Churchill, 1944
-----
Never argue with a fool. Onlookers may not be able to tell the difference.
Mark Twain -
I'm starting to write an app which can work online or offline by syncing with a remote SQL DB and using either that or a local SqLite DB if it isn't. So, the SqLite stuff is in a separate assembly (in case I want to use Access, or whatever instead later) and the main app shouldn't know what is working. But ... you try to run it, and it collapses because it can't find the Interop DLL. Solution? Add reference support for SqLite to the main app because the stupid thing uses the startup assembly for details and not the current one. Bah! Stupid!
Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!
-
If it were me... I would probably have the user install SQL Server Express if they want a local db for fail-over. At that point, all you have to do is change the connection string in your app, and Bob's your uncle. None of the code changes. Of course, if the user doesn't want to install Express, he doesn't get a fail-over db, but you could put that choice on the user's shoulders. ...if it were me.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013That's actually how I solved this problem for a previous client. Of course there was no requirements for andriod or mac or anything like that so non off the cross platform problems.
Tom