I'm in a **** situations and therefore before choosing a way, I'm just
trying to ask your opinion about this problem. I have to create a management
program under VC++6.0 using MFC for Win98. The program has to get 32
resources (there are actually some voice messages, converted to binary
data!) from a driver, and then it will notify a hardware via the TCP/IP
protocol to do some sorta things! Let me make the long story short, it has
to be pretty scalable, and high performance in means of using Threads, and
CPU time!

Now imagine 32 threads that are running simultanously (in worst case)! Since
those voice messages has to be written and kept on database (SQLServer), and
the SQLServer is supposed to be run on another machine, I would like to do
much of the data itteration and processing over the server, and therefore
increasing the speed of the client program, which is actually the heart of
the project!

Since each voice message is probably something about 400Kbyte in volume, I
created a column, say, dataColumn with the image data type! However, I'm not
going to read all of that data in one touch, since this brings the systsem
completely down! (I need the bandwidth of the network for some other
important data!). So I tried to get 8000 bytes each time, by the following
SQL statement:

SUBSTRING(column_name, start_index, 8000)

I mean I run it over and over again, until the data is completely read, or
the user cancels the operation! However, some hours ago, I just noticed 2
other ways to read/write chunk of data using ADO, perchance: AppendChunk and

Now the questions:

0. Does GetChunk do the same thing as SUBSTRING does? just with this
difference that GetChunk is run on Client within my progra, and SUBSTRING is
at the server side, within the stored procedure.
1. Whats the best way of reading data in chunks of 8000 bytes, on SQLServer
Side (within a stored procedure)
2. Whats the best way of reading data in chunks of 8000 bytes, on Client
side(within my program, using ADO)
3. Whats the use of ReadText and its difference with SUBSTRING statement
4. Do u have better idea about the whole problem? Should I actually use the
image datatype?

Thank u for your time,
Got a question about modems? Take a look at http://www.modemmania.com
"The important thing is not to stop questioning. -- Albert Einstein"