Win NT Service Application TCPClient, data transfer

Greetings,

What is the best way to ensure that a string sent to my service application gets transferred properly.

I have TIDTcpClients connecting to a service application that resides on the intranet of our client.
The service application with a TServerSocket listening on port 555 where it will read incoming data
with the "ServerSocketClientRead" event.

All is well, but due to heavy traffic on the network at times, it happens that some records never gets
to my database (SQL server 2000)

What is the best method of enuring that data was received and the record inserted into my DB ?

Would also increase the pts for some pointers on best practices wrt implementing a caching macility
in the event where data cannot be transferred.

Thanks in advance.

EngwiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

2266180Commented:
well, best of best way is to use some sort of CRC. so you change your protocol to something like this:

on client sice:
repeat
start send
- send packet size
- send packet
- send packet crc
end send
read status
until status=ok

on server side:
start receive
- read packet size
- read packet: validate packet size to be the one sent
- read crc: validate packet to have good crc
end receive
write status

regarding:
"Would also increase the pts for some pointers on best practices wrt implementing a caching macility
in the event where data cannot be transferred."

could you rephrase? :)

if you are thinking of doing caching for the inital problem, forget it: caching is done when you don't want to send over the same that the client/server already has. and caching is done on receiving end (and since it didn't go through, there is nothing to cache ;) )

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.