Handling database locally using Cache
-
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
-
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
You can have two ID in Tables 1 is LocalID and another is CentralID Might be the solution.
Best Regards, Chetan Patel
-
You can have two ID in Tables 1 is LocalID and another is CentralID Might be the solution.
Best Regards, Chetan Patel
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