How do I handle BLOB fields in the Recordset
Question:
When dealing with BLOB fields from Microsoft SQL Server, you must put them to the right of non-BLOB columns in the resultset. To be safe, you should also read the columns in left-to-right order, so if you have two BLOB columns as the last two columns in your resultset, read the first one and then the second. Do not read them in the reverse order.
Answer:
Make sure your blob fields are the last in the sql string.
SELECT varChar, int, image, text FROM table <- OK
SELECT image, varChar, int, text FROM table <- NOT OK
I've allso experienced problems with views, after adding a new varchar field to my DB as the last in a table, the existing views (queries) using SELECT * would return the new varchar field AFTER the BLOB fields, thus generating an error.
MS: http://support.microsoft.com/support/kb/articles/q175/2/39.asp
ActiveX Data Objects (ADO), versions 1.0, 1.5, 2.0, 2.1, 2.1 SP1
When dealing with BLOB fields from Microsoft SQL Server, you must put them to the right of non-BLOB columns in the resultset. To be safe, you should also read the columns in left-to-right order, so if you have two BLOB columns as the last two columns in your resultset, read the first one and then the second. Do not read them in the reverse order.
Comments
Integrate w/ Dreamweaver 8
You must me logged in to write a comment.