[thelist] SQL Server tip

Cory Preus cory_preus at cnt.com
Thu Feb 1 12:14:48 CST 2001

Last week I had a question about missing elements from a recordset using ASP
to query SQL server data. I found the problem and some folks might be
interested in the info.


<tip type="SQL Server">

If you do not have Mdac 2.1sp2 or later with the 3.7 driver or later for SQL
Server installed, text/BLOB fields are selected in an order preceding other
types of fields. Thus, it is necessary to structure your SQL query with text
and BLOB fields last.

SELECT [id], [date], [text], [blob] FROM [table]

Moreover, it is important to retrieve the data from the recordset in a
similar fashion. Minor fields first and text/BLOBs last (in the order stated
in the SQL statement).

A more robust explanation is available here:

Or one can just upgrade Mdac and the SQL server driver. ;)


More information about the thelist mailing list