0
我得到一个NullReferenceException错误,同时保存记录与下面的语句:的NullReferenceException发生
Dim sel As String = "select COUNT(*) from Master_URLEntry where Projectname='" &0 G_Current_Project & "' and ListCode like '%" & sCode & "%' "]
If blnAdd = False Then
sel += "and Recordid not in ('" & _dtMasterRow.Item("RecordID") & "')"
End If
可能重复[什么是NullReferenceException,我该如何解决它?](http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-doi-i-fix-它) – Jay
并提防SQL注入 – Fredou