title: MySQLDataReader retrieving Null value problem in c#
body: <p>I am currently working on a C# project that will export MySQL Data. The export is for any database within the server so I am not going to know what fields and the data types that are in the table and I am not going to know if a field in the table allows null values or not. </p>
  
  <p>During testing, I have found that the export is working fine but if the field allows null when the mysql data reader goes gets to the row which is null it displays an error SqlNullValueException, data is null. </p>
  
  <p>I have tried doing <code>if (reader.getString(field) == null) {}</code> but it is still displaying the error.</p>
  
  <p>How do I cope with Null values in the database.</p>
  
  <p>Thanks for any help you can provide. </p>