Example: SelValidate for variant_row - copy the the BoundIO null data flags to the variant row null flag fields.


// This function is a specialized version of DefaultSelValidate to copy 
// information about NULL columns from the BoundIOs structure to the variant_row class
template<> class DefaultSelValidate<variant_row> {
public:
	bool operator()(BoundIOs &boundIOs, variant_row &rowbuf)
	{
		rowbuf.ClearNulls(); 
		for (BoundIOs::iterator b_it = boundIOs.begin();
				b_it != boundIOs.end(); b_it++)
		{
			BoundIO &boundIO = (*b_it).second;
			if ((boundIO.IsColumn() || boundIO.GetParamType() == SQL_PARAM_OUTPUT  || boundIO.GetParamType() == SQL_PARAM_INPUT_OUTPUT) 
				&& boundIO.IsNull())
				rowbuf.SetNull(boundIO.GetName()); // found null column ... record null status in rowbuf 
		}

		return true;	// assume data is OK
	}
};