Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Oooo ... that's annoying.

Oooo ... that's annoying.

Scheduled Pinned Locked Moved The Lounge
databasecomquestionsqlite
9 Posts 8 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • OriginalGriffO Offline
    OriginalGriffO Offline
    OriginalGriff
    wrote on last edited by
    #1

    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 have no idea what I did, but I'm taking full credit for it." - ThisOldTony
    "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

    realJSOPR K M P L 5 Replies Last reply
    0
    • OriginalGriffO OriginalGriff

      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!

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      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

      OriginalGriffO T 2 Replies Last reply
      0
      • OriginalGriffO OriginalGriff

        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!

        K Online
        K Online
        kmoorevs
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        • realJSOPR realJSOP

          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

          OriginalGriffO Offline
          OriginalGriffO Offline
          OriginalGriff
          wrote on last edited by
          #4

          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!

          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
          "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

          1 Reply Last reply
          0
          • OriginalGriffO OriginalGriff

            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!

            M Offline
            M Offline
            Marc Clifton
            wrote on last edited by
            #5

            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

            J 1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              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!

              P Offline
              P Offline
              PIEBALDconsult
              wrote on last edited by
              #6

              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.

              1 Reply Last reply
              0
              • M Marc Clifton

                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

                J Offline
                J Offline
                Johnny J
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff

                  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!

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  challenge yourself a bit more, make it a stand-alone service that can handle requests even while synchronizing off- to on-line.

                  1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    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

                    T Offline
                    T Offline
                    Tom Deketelaere
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups