Click here to Skip to main content
16,019,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm begginer in databases,
Now i'm working on clinic project

I designed an application for the doctor's computer and another application for the secretary (just to create bookings for patients )

secretary application is connected to the database remotely that exists on the
doctor's computer

I made a timer that executing a stored prosdure (SELECT Statement) every second so the doctor can see the inserted data from the seceratry just when it's created
and keep secretary application always updated with the database too
so i built the sync system on the timer& stored procedures idea
but it doesn't work fine
some times queries lock each other because i've no experience with lock methods in sql server, otherwise the repeted query is affects the application performance

What I have tried:

I heared about microsoft sync framework but i don't know how it works or how can it be usefull to me in this case
Posted
Updated 27-Apr-17 23:49pm
Comments
vivvicks 28-Apr-17 4:55am    
what about maitinang isolation level at DB level

1 solution

Get rid of the timer. They are awful things. As you have experienced they can just tie your system up doing nothing useful.

Both applications are "looking at" the same database, so sync is not relevant to your problem.

Personally I would the application in such a way that the user has to refresh a view and if they try to enter any data then the data is automatically refreshed for them. After all, I suspect the Doctor will be dealing with patients not watching his screen waiting for information to appear.

The SqlDependency class might be what you are looking for - see Solution 1 by maciej los here - Is it possible to monitor multiple table data changes using SQL table dependency?[^]

Given your current level of knowledge, I would just provide a refresh button to each user.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900