|
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
|
|
|
|
|
The 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!
|
|
|
|
|
That'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
|
|
|
|
|
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. 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
|
|
|
|
|
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!
I've always been pissed when an application refuses to start and you don't know what assembly it is missing to do so!
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 prefer to load database support assemblies dynamically upon request.
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.
|
|
|
|
|
challenge yourself a bit more,
make it a stand-alone service that can handle requests even while synchronizing off- to on-line.
|
|
|
|
|
and orders 1.00000000009 root beers.
The bartender says "I will have to charge you extra for that, because it's a float."
The man responds "In that case, you might as well make it a double!"
I'll get my coat
I'm currently unsupervised, I know it freaks me out too!
JaxCoder.com
|
|
|
|
|
This is the kind of humor that absolutely makes my day!
/ravi
|
|
|
|
|
|
There is a band called Floater who play very interesting music of a bit different style.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
In Mumbai they would have the courtesy to ask "Would you like NaN with that, Sir ?"
"If we don't change direction, we'll end up where we're going"
|
|
|
|
|
A man goes into a bar and orders a single malt Scotch whiskey, he gets 1.00000000003.
|
|
|
|
|
I'm floored.
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
|
|
|
|
|
It would be a nice movie, if only we can get a proper cast.
GCS d--(d+) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
This guy really needs help![^]
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 think I can successfully recover all files on the hardware you sent me, attached please find a pro-forma invoice ...
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!
|
|
|
|
|
|
That is my favorite all time Carnac joke.
|
|
|
|
|
That sure looks like a POWERful hard drive
|
|
|
|
|
Watts the big deal here?
Socialism is the Axe Body Spray of political ideologies: It never does what it claims to do, but people too young to know better keep buying it anyway. (Glenn Reynolds)
|
|
|
|
|
I'd play along and respond by saying the files are encrypted and I need the keys, but then I suspect the other guy wouldn't get it and send the case keys...
(remember those? are they still being made...?)
|
|
|
|
|
I usually disguise my hard drives that way and the power supplies are make believe hard drives. Until now I always thought that nobody ever noticed that, but now I must look which hard drive is missing. Do you have a version of that image where the name and address of this thief are not blackened out?
I have lived with several Zen masters - all of them were cats.
His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.
|
|
|
|