1
我正在使用.net開發Epicor上的自定義功能。我試圖更新表,但是,我不知道爲什麼它不起作用。關閉應用程序後,這些字段保持相同的值。有什麼我失蹤?提前致謝!更新不會更改表格中的字段值
Dim adapterLaborDtlSearch As LaborDtlSearchAdapter = New LaborDtlSearchAdapter(HHWorkQueueForm)
adapterLaborDtlSearch.BOConnect()
LaborDtlDV = CType(oTrans.EpiDataViews("LaborDtl"), EpiDataView)
Dim laborHedSeq As Integer = LaborDtlDV.dataView(LaborDtlDV.Row)("laborHedSeq")
Dim laborDtlSeq As Integer = LaborDtlDV.dataView(LaborDtlDV.Row)("laborDtlSeq")
Dim laborDtlSchDataSet As Data.DataSet = adapterLaborDtlSearch.GetData(laborHedSeq, laborDtlSeq)
laborDtlSchDataSet.Tables("LaborDtl").Rows(0).BeginEdit
laborDtlSchDataSet.Tables("LaborDtl").Rows(0).Item("LaborQty") = nedShiftQty.value
laborDtlSchDataSet.Tables("LaborDtl").Rows(0).EndEdit
laborDtlSchDataSet.Tables("LaborDtl").AcceptChanges
adapterLaborDtlSearch.Update()
這是更新方法的堆棧跟蹤。
Exception caught in: Epicor.Mfg.BO.LaborDtlSearch
Error Detail
============
Message: This function is not allowed.
Type: Error
Program: bo/LaborDtlSearch/LaborDtlSearch.p
Method: laborDtlBeforeUpdate
Table: laborDtl
Row:
Field:
Stack Trace
===========
at Epicor.Mfg.Proxy.LaborDtlSearchImpl.Update(LaborDtlSearchDataSet ds)
at Epicor.Mfg.UI.Adapters.LaborDtlSearchAdapter.Update()
at Script.updateTablesData()
Inner Exception
===============
ERROR condition: The Server application has returned an error. (7243) (7211)
Inner Stack Trace
=================
at Progress.Open4GL.DynamicAPI.Session.runProcedure(String requestID, String procedureName, ParameterSet parms, Boolean persistent, Boolean internal_Renamed, Int64 procId, MetaSchema localSchema, Int32 stateModel)
at Progress.Open4GL.DynamicAPI.Session.runStatelessProcedure(String requestID, String fullProcedureName, ParameterSet inparams, Object procId, MetaSchema localSchema, Int32 stateModel)
at Progress.Open4GL.DynamicAPI.PersistentProc.runTheProcedure(String requestID, String procedureName, ParameterSet parms, MetaSchema schema)
at Progress.Open4GL.DynamicAPI.PersistentProc.runProcedure(String procedureName, ParameterSet parms, MetaSchema schema)
at Epicor.Mfg.Core.CallContext.CallContextPersistentProc.runProcedure(String procedureName, ParameterSet parameters, MetaSchema metaSchema)
at Epicor.Mfg.Core.CallContext.ProxyHelper.CallMethod(String methodName, ParameterSet parameters, MetaSchema metaSchema, BLConnectionPool connPool, Session connection, PersistentProc persistProc, CallContextDataSet callContextDataSet)
at Epicor.Mfg.Proxy.LaborDtlSearchImpl.Update(LaborDtlSearchDataSet ds)
如果我提出的AcceptChanges的adapterLaborDtlSearch.Update後()在執行時調用它拋出一個錯誤「此功能是不允許的」 我已經編輯與拋出的堆棧跟蹤的問題。 這可能與不允許更新的數據庫有關嗎?任何丟失的配置.. – Marcos
@Marcos:我不熟悉Epicor,但它看起來像你有更新表之前執行的方法,並且該方法導致錯誤。 –