StefanoCarniel
Programmer
Hello, I'm trying to read the value of the field PostalCode from an Access database using ado with the following sintax:
CString buff;
buff = pRecordsetAccess->Fields->GetItem ("PostalCode")->Value.bstrVal;
but if the field is empty (NULL value), I get an access violation error. I tried to use other sintax, like
....->Value.bVal;
in this case I do not get any error, but in buff I find a strange character and not an empty string. How can I manage this situation?
Thank you
CString buff;
buff = pRecordsetAccess->Fields->GetItem ("PostalCode")->Value.bstrVal;
but if the field is empty (NULL value), I get an access violation error. I tried to use other sintax, like
....->Value.bVal;
in this case I do not get any error, but in buff I find a strange character and not an empty string. How can I manage this situation?
Thank you