TEXT/BLOB 이 들어있는 테이블을 긁어올 때는 TEXT/BLOB 컬럼을 SELECT 리스트의 맨 뒤에다 둬야 한다.
SELECT ID, BLOB_COLUMN, INT_COLUMN FROM SomeTable --> X
SELECT ID, INT_COLUMN, BLOB_COLUMN FROM SomeTable --> O
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/odbcgetting_long_data.asp
There are a number of restrictions on using SQLGetData. In general, columns accessed with SQLGetData:
- Must be accessed in order of increasing column number (because of the way the columns of a result set are read from the data source). For example, it is an error to call SQLGetData for column 5 and then call it for column 4.
- Cannot be bound.
- Must have a higher column number than the last bound column. For example, if the last bound column is column 3, it is an error to call SQLGetData for column 2. For this reason, applications should be careful to place long data columns at the end of the select list.
- Cannot be used if SQLFetch or SQLFetchScroll was called to retrieve more than one row.
시팍, 프로그램 잘못 짠 줄 알고 한참 찾았다.

글
댓글을 달아 주세요
댓글 RSS 주소 : http://serious-code.net/tc/rss/comment/2댓글 ATOM 주소 : http://serious-code.net/tc/atom/comment/2