Click here to Skip to main content
16,016,678 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one problem

Each client separately in the database after a certain period of time by pressing the sync information is transmitted to the server.

Here we have a database server.All client data is transferred to the base.
The server is also responsible for cleaning and editing data

1.What is the data transfer protocol?
2.Prevent transmission of redundant data؟
3.Detected and removed by editing and synchronization with the server؟
Posted

1 solution

I think you meant to say how should you be sending the data from client to the SQL Server. I would use HTTP for this, you should know HTTP is powerfull enough to be used as this. There are many APIs already built on HTTP/HTTPS.

POST requests can be used while sending the data. You can learn more about this method of sending the data from/to client from SQL Server (or the web server as a whole) here, https://en.wikipedia.org/wiki/POST_(HTTP)[^]

Your second question is a simple one, SQL Server has a built-in function to remove the redundant data. For example, if you want the ClientID to be unique, you can make it a PrimaryKey in the Database and Database will automatically make it impossible for the user to add duplicate data. You can have two or more columns made a Unique field too, they're known as CompositeKeys. So, you won't need any more coding for this one.

More on Primary key here, http://technet.microsoft.com/en-us/library/ms191236(v=sql.105).aspx[^]

Do not stop the user from writing any sort of data, until he is writing stop your processes. Once he presses the button to synchronize the data with the SQL Server, do the Validation for the data there. Send the data to the server and check for any duplication, if there is then prevent him from adding the data by showing him an error message.
 
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