Transefr data client - server

ManicCW

Well-known member
Joined
Jul 21, 2005
Messages
428
Location
Mostar
Programming Experience
Beginner
Transfer data client - server

I have one big problem. I have application than uses msde database. Application is installed on several client computers that have no connection to main server. Now I need to transfer data from client to server using sql scripts or something.

How do I manage keys??? Because there are some related tables so if I insert data the keys wont match because two different clients can have same data ID (for example CustomerID).

Is there a solution???
 
Last edited:
Are you saying that you need to create records on clients and then manually transfer that data to the server to be added to the database? If that's the case then I think the only way to make sure clients don't try to use the same IDs is to allocate certain ranges for each client. There is no other way for a disconnected client to issue an ID and know that it will be unique.
 
Yes that is what I'm talking about. Ranges are not so suitable for this purpose because client number will grow (to maybe 100). It is not good solution for me (it will give me problems).

Now, I have an idea on mind but I don't know how to put it in action.

I was thinking about crating stored procedure on server to manipulate data. For example if I have sql script that inserts data from client to server, the script will insert data (without ID) to child tables, then stored procedure (or some code snippet) will get inserted IDs and change child IDs to parent table in script.

Am I making any sense or I'm just wasting my time?
 
ok,why not try this..
Have 2 programs..client and server...
send commands from client to server using tcpclient..
and in the server..check for that paticular command and make it perform that action.
and after that,transfer the file with the records contents to server..
and when it reaches the server,let it store its contents to database :)
 
Back
Top