试图除以零

时间:2012-01-08 20:42:29

标签: c# asp.net vb.net odp.net

我正在使用.net:

的oracle数据提供程序

Oracle.DataAccess.dll vesrion:2.111.7.2

现在只需激活一个select all语句,然后使用OracleDataAdapater生成BUG(尝试除以零)

Dim conn As new OracleConnection(sConnectionString)
Dim dt As New DataTable
conn.Open()
Dim da As New OracleDataAdapter(" SELECT * FROM employee", conn)
da.Fill(dt) 'Exception

但如果我使用OracleDataReader执行语句,那么它工作正常,例如

Dim conn As new OracleConnection(sConnectionString)

Dim dt As New DataTable
Dim cmd As New OracleCommand(" SELECT * FROM employee")
cmd.Connection = conn
Dim dr As OracleDataReader = cmd.ExecuteReader()
Dim dt As New DataTable()
dt.Load(dr)

请有任何科学解释吗?

我的堆栈跟踪:

at Oracle.DataAccess.Client.OracleDataReader.GetValues(Object[] values)
   at System.Data.ProviderBase.DataReaderContainer.CommonLanguageSubsetDataReader.GetValues(Object[] values)
   at System.Data.ProviderBase.SchemaMapping.LoadDataRow()
   at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
   at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DataAdapter.Fill(DataTable[] dataTables, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
   at Oracle.DataAccess.Client.OracleDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
   at MedicalComponent.DAL.Production.MEMBERS_DAL.dtMemberClaims(Nullable`1 MPD_MBR_ID, Nullable`1 MPD_PLC_ID, String MEMBER_SEGMENT, Nullable`1 P_CLAIM_NO, Nullable`1 P_FROM_DATE, Nullable`1 P_TO_DATE, Nullable`1 FinanicalYear, Nullable`1 P_CLAIM_TYPE, Nullable`1 P_STATUS, Nullable`1 P_BENEFIT_TYPE, Nullable`1 P_MST_BNF_ID, String MST_ICD_CODE, Nullable`1 P_MNT_PRV_ID, Boolean AllFamilyClaims, Int32 PAGE_SIZE, Int32 PAGE_NUMBER, String SORT, Int32& PAGE_COUNT) in C:\inetpub\wwwroot\MedicalInsurance\MedicalInsurance3.5\MedicalComponent\DAL\Production\MEMBERS_DAL.cs:line 3399

enter image description here

0 个答案:

没有答案