Is it just me or does the MySQLCommunityServer now return a nil DatabaseField object when the value of a database column is null. It used to return a valid DatabaseField with a value that was nil.
For example the following code used to work without a problem but now it throws a NilObjectException
oRecordSet = MyDB.SQLSelect( "Select UserID, Name from MyUserTable;" )
if oRecordSet <> nil then
cName = oRecordSet.Field( "Name" ).StringValue // *****
end if
The line marked ***** throws an exception if the column called Name contains a null value. Previously .Value would return nil and .StringValue would return “”.
In other words it used to do this:
oRecordSet.Field( “Name” ) => a Valid databasefield object
oRecordSet.Field( “Name” ).value => nil
oRecordSet.Field( “Name” ).StringValue => “”
and now it does this:
oRecordSet.Field( “Name” ) => nil
oRecordSet.Field( “Name” ).value => Exception
oRecordSet.Field( “Name” ).StringValue => Exception