B
Burton Wilkins
Gentlemen:
How is it that some get their questions answered, and
others don't? If there is a "do-not-answer" list, and my
name is on it, would you please take my name off it? I'm
asking some serious questions on Byte arrays. Could
someone please respond?
I am building a general tool that should be able to read
and write all SQL Server datatypes. Presently, I am
working on that section of the program that reads and
writes Images. Going to the helps that come with .Net, I
find that Image map to an array of Bytes. Checking other
SQL DataTypes, I find that there are other SQL DataTypes
which map to an array of Bytes as well. Those datatypes
that apparently map to an array of Bytes are the
following: Binary, Image, TimeStamp, and VarBinary. My
first question, are all four of these datatypes considered
BLOBs? Are their other SQL Datatypes besides these four
that would map to arrays of Bytes, and are considered
Blobs?
Now, going to MSDN (Article 317044), I find that to read
or write an Image, one uses "the Microsoft SQL Server
READTEXT and UPDATETEXT statements to read and write data
from BLOB (LongVarBinary) columns in a database table."
The article further states that "Unlike with ADO 2.6 and
later, ADO.NET does not support reading and writing BLOB
objects by using Stream objects. ADO.NET data providers do
not have GetChunk and AppendChunk methods available to the
Data Access Object (DAO) and ActiveX Data Objects (ADO)
Recordset objects. To read a BLOB field for in-memory
manipulation, you can use a DataReader object to select
the row, or you can cache the data in a DataSet.
However, if you want to stream the data to a different
medium, such as disk or Web response, then you can read
the BLOB from the server in smaller chunks to minimize the
amount of memory that the process consumes."
Now my second question is, besides Images is this ALSO the
suggested approach for reading and writing Binary,
TimeStamp, and VarBinary datatypes to and from SQL
databases, or could one safely read or write Binary,
TimeStamp, and VarBinary with a "SELECT" and "UPDATE" SQL
statement? What then is the recommended approach, the
one that will most likely produce success all the time
reading and writing arrays of Bytes in ADO.Net?
Thank you in advance for answering this three general
question.
Sincerely,
Burton G. Wilkins.
How is it that some get their questions answered, and
others don't? If there is a "do-not-answer" list, and my
name is on it, would you please take my name off it? I'm
asking some serious questions on Byte arrays. Could
someone please respond?
I am building a general tool that should be able to read
and write all SQL Server datatypes. Presently, I am
working on that section of the program that reads and
writes Images. Going to the helps that come with .Net, I
find that Image map to an array of Bytes. Checking other
SQL DataTypes, I find that there are other SQL DataTypes
which map to an array of Bytes as well. Those datatypes
that apparently map to an array of Bytes are the
following: Binary, Image, TimeStamp, and VarBinary. My
first question, are all four of these datatypes considered
BLOBs? Are their other SQL Datatypes besides these four
that would map to arrays of Bytes, and are considered
Blobs?
Now, going to MSDN (Article 317044), I find that to read
or write an Image, one uses "the Microsoft SQL Server
READTEXT and UPDATETEXT statements to read and write data
from BLOB (LongVarBinary) columns in a database table."
The article further states that "Unlike with ADO 2.6 and
later, ADO.NET does not support reading and writing BLOB
objects by using Stream objects. ADO.NET data providers do
not have GetChunk and AppendChunk methods available to the
Data Access Object (DAO) and ActiveX Data Objects (ADO)
Recordset objects. To read a BLOB field for in-memory
manipulation, you can use a DataReader object to select
the row, or you can cache the data in a DataSet.
However, if you want to stream the data to a different
medium, such as disk or Web response, then you can read
the BLOB from the server in smaller chunks to minimize the
amount of memory that the process consumes."
Now my second question is, besides Images is this ALSO the
suggested approach for reading and writing Binary,
TimeStamp, and VarBinary datatypes to and from SQL
databases, or could one safely read or write Binary,
TimeStamp, and VarBinary with a "SELECT" and "UPDATE" SQL
statement? What then is the recommended approach, the
one that will most likely produce success all the time
reading and writing arrays of Bytes in ADO.Net?
Thank you in advance for answering this three general
question.
Sincerely,
Burton G. Wilkins.