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. Web Development
  3. ASP.NET
  4. Handling database locally using Cache

Handling database locally using Cache

Scheduled Pinned Locked Moved ASP.NET
databasesysadminhelpquestionannouncement
3 Posts 2 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.
  • S Offline
    S Offline
    sjs4u
    wrote on last edited by
    #1

    Hi, In my Web Application I have my database on central server. There is one table A which is associated with 10-12 table. i.e. A tables primary key used as Foreign Key in other table. I used web service. Now I have other application(Desktop Application) where I used web service. Now in that case I directly uses web service where in that I directly connect to the central database. Now my problem is I have my 3rd application(Desktop application) where I dont want to connect directly to the central database. Means at first time its Ok to connect to the central database but for other manupulation it wont connect to the central database. I want to done it locally. Once all finish it will then update to the central database with all tables updated records. Both 2nd and 3rd application run simultaneously. So because of local applications data is not updated 2nd application which is running will also provide the same primary key as local applications data once database manipulation done. So if I integrate these database then it will overwrite the data or my 2nd applications data will lost. I am using cache concept. But there is another problem of using caching if shut down the computer or power interrupt it will again lost the data. So what can i do? Thanks Sjs

    C 1 Reply Last reply
    0
    • S sjs4u

      Hi, In my Web Application I have my database on central server. There is one table A which is associated with 10-12 table. i.e. A tables primary key used as Foreign Key in other table. I used web service. Now I have other application(Desktop Application) where I used web service. Now in that case I directly uses web service where in that I directly connect to the central database. Now my problem is I have my 3rd application(Desktop application) where I dont want to connect directly to the central database. Means at first time its Ok to connect to the central database but for other manupulation it wont connect to the central database. I want to done it locally. Once all finish it will then update to the central database with all tables updated records. Both 2nd and 3rd application run simultaneously. So because of local applications data is not updated 2nd application which is running will also provide the same primary key as local applications data once database manipulation done. So if I integrate these database then it will overwrite the data or my 2nd applications data will lost. I am using cache concept. But there is another problem of using caching if shut down the computer or power interrupt it will again lost the data. So what can i do? Thanks Sjs

      C Offline
      C Offline
      Chetan Patel
      wrote on last edited by
      #2

      You can have two ID in Tables 1 is LocalID and another is CentralID Might be the solution.

      Best Regards, Chetan Patel

      S 1 Reply Last reply
      0
      • C Chetan Patel

        You can have two ID in Tables 1 is LocalID and another is CentralID Might be the solution.

        Best Regards, Chetan Patel

        S Offline
        S Offline
        sjs4u
        wrote on last edited by
        #3

        Thanks for the reply. Now just I will explain what exactly problem is My A table is very important. Now when my 2nd application run and when I login then automatically 1 entry is inserted into A table. Some work done on windows application and when going to next level it will again insert 1 entry to A table So if my A table start with 19th entry it will finish with 20th entry. There are some process in windows application where each time 1 entry inserted into A table. So near about 4-5 time each entry inserted. Having Same application 3rd application running locally with same database manupulation. i.e. one entry inserted after login. so if after 2nd aplication login if my local 3rd application run and once user login then it will automatically generate next primary key i.e.20 at local machine which is already there on server database. And All my other forms which is depends on that primary key. If I going to update server database with local entry then it will conflict. Thanks Sjs

        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