草庐IT

namethestore

全部标签

c# - 数据为空。不能对空值调用此方法或属性。(使用组合框)

您好,我将用于填充组合框的表中有空值。我不知道该怎么做。当我运行以下代码时出现错误:DataisNull.Thismethodorpropertycannotbecalledonnullvalues.我需要帮助,我是mysql的新手代码:privatevoidcomboBox1_SelectedIndexChanged(objectsender,EventArgse){stringconstring="datasource=localhost;port=3306;username=root;password=root";stringQuery="SELECT*fromdatabase.