I've created a client/ server program and I'm not happy with some logic for the server.

What I'm doing is

Pulling it from the data base
adding it to an array ' to help check for error
Using the array to save to text file ' for preparation for sending
Reading it in binary
Sending the file a chunk at a time.

This is causing me some problems. I want to re-write the code because I feel that this is very inefficient way of doing things.

Is there an easier way of doing what I'm doing?

can u tell how the client and server are connected. Is is Local Network, Dial-Up or something else.
U can also post some sample code for the hint of what u r actually trying to do, so that we can figure out the best possible way from what ur expectations are.

Regards
Shaik Akthar