【发布时间】:2010-02-19 01:43:37
【问题描述】:
先生,我在 vs2005 中开发了以下代码,现在我只是在我的新项目 @ vs 2008 中使用这个模块.. 但是出现了这个错误。我无法解决这个问题...
Private Sub DataAccess()
Dim errHandle As New ErrorHandler
Dim lobjCommon As New eCopsCommonFunctions
Try
AccessCodeDrplst.DataSource = CType(lobjCommon.gfuncGetAllEnrollmentSource(), DataSet)
AccessCodeDrplst.DataValueField = "DataAccessCode"
AccessCodeDrplst.DataTextField = "DataAccessDesc"
AccessCodeDrplst.DataBind()
'lstEnrollmentSourceCode.DataValueField = "EnrollmentSourceCode"
'lstEnrollmentSourceCode.DataTextField = "EnrollmentSourceDesc"
'lstEnrollmentSourceCode.DataBind()
'"Beneficiary Election" is pre selected as default value. By pals on Oct 24th 2007
'lstEnrollmentSourceCode.SelectedValue = "B"
'lstEnrollmentSourceCode.Items.Insert(0, New ListItem("Select", "0"))
Catch ex As Exception
errHandle.gProcHandleErrors(ex, Session("MemberID"), "SPStatus.aspx.vb, gprocFillSEPCode")
Throw ex
Finally
lobjCommon = Nothing
///here the error occurs as 'NullException was unhandle by the user code'
errHandle = Nothing
End Try
End Sub
【问题讨论】:
-
再次检查您发布的 finally 块中的代码是否与您的程序中的代码实际匹配。
-
user238319 - 问题解决了吗?