Quantcast
Channel: SQL Server Data Access forum
Viewing all articles
Browse latest Browse all 4164

Using SQLBindCol to get column length of unbound long data column

$
0
0

Hello,

according to the documentation of SQLBindCol it should be possible to get only the column length information by setting TargetValuePtr to NULL and StrLen_or_IndPtr to a valid value:

TargetValuePtr

...

If TargetValuePtr is a null pointer, the driver unbinds the data buffer for the column. ... An application can unbind the data buffer for a column but still have a length/indicator buffer bound for the column, if theTargetValuePtr argument in the call to SQLBindCol is a null pointer but theStrLen_or_IndPtrargument is a valid value.

I tried that, but StrLen_or_IndPtr does not get filled.

My idea is to get the length of an unbound long data column this way and then later call SQLGetData only if the length is > 0.

What am I doing wrong?


Viewing all articles
Browse latest Browse all 4164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>