2 messages in com.mysql.lists.plusplushow to detect NULL columns in result ...
FromSent OnAttachments
Vijay Ramachandran23 Jul 2003 06:47 
Sinisa Milivojevic24 Jul 2003 04:15 
Subject:how to detect NULL columns in result row?
From:Vijay Ramachandran (vij@yahoo-inc.com)
Date:07/23/2003 06:47:45 AM
List:com.mysql.lists.plusplus

Hi.

How can I detect if a particular column in a result row is NULL?

For example, if I assign to an integer using operator [], it aborts. Checking if the string in the column is the value "NULL" seems to work, though:

if (strcmp((const char*)row[index], "NULL") == 0)

This is not documented anywhere, though. What's the recommended way?

thanks, Vijay