Skip to Content
0
Former Member
Apr 02, 2013 at 08:00 PM

Retriving the CS_IODESC structure for an text/image column that is NULL

31 Views

Hi,

I'm having trouble retrieving the CS_IODESC structure for an image column that contains a NULL value (ASE 15.0.3 and 15.5) using OpenClient 15.7.

The actual program is a DBD::Sybase perl script, but the flow corresponds to the logic defined here: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc32840.1570/html/ctref/X16290.htm namely:

ct_command() with a query for the image column for the row in question

ct_fetch() of a row

ct_get_data() for the column of interest (though initially I was skipping this step - doesn't appear to make any difference)

ct_data_info().

The last call succeeds, but leaves the IODESC struct undefined, which causes the following error:

<- syb_ct_send_data= '' at BlobWriteTest.pl line 53

DBD::Sybase::st syb_ct_send_data failed: Server message number=156 severity=15 state=2 line=1 server=VM155 text=Incorrect syntax near the keyword 'NULL'.

which, after a quick ribo session, is the textpointer passed to the "writetext bulk" command.

My current work-around is to first update the data item to a non-null value, but I was wondering if you could tell me if I'm doing something seriously wrong - I'm almost positive that this used to work with 12.5 and earlier.

Thanks!

Michael