我目前正在开发一个C# MySQL Export Utility。 由于这一原因,我不了解表格中每个领域的领域或数据类型。
当我从数据库的表格中输出数据时,它显示的是MySQL的变幻影,称它无法更改MySQL的截止日期/时间。 日期: 在我制定法典时,它正在这样做:
if (!reader.isDBNull(fieldCount)){}
However, when the exception was thrown on this line I fixed it by adding Allow Zero DateTime=true to the MySQL Connection string but not it is displaying the error when I run the code
string value = reader.getString(field);
How can I get around this issue bearing in mind I am not going to know what data type is or what the value is going to be.
Thanks for any help you can provide.