on 05-24-2007 11:34 AM
Hi,
when i update a sales orders documents with the batch numbers and batch quantity,sometimes i'm getting the following error <i>Error -2028</i> or the <i>Error - 1</i> !!!!! ?????
-
My Code -
-
Dim bIsFirstBatch As Boolean = True
While Not ovRS.EoF And Bol = True
If bIsFirstBatch = False Then
ovDocOrd.Lines.BatchNumbers.Add()
End If
iQte = CInt(ovRS.Fields.Item(3).Value)
iCommited = CInt(ovRS.Fields.Item(4).Value)
sBtchNbr = CStr(ovRS.Fields.Item(0).Value)
valAfect = iQte - iCommited
valRest = oTotCar - valAfect
If valRest > 0 Then
Try
ovDocOrd.Lines.BatchNumbers.BatchNumber = sBtchNbr
ovDocOrd.Lines.BatchNumbers.Quantity = valAfect
oTotCar = valRest
Catch ex As Exception
VBOEM10.ExceptionManager.Publish(ex)
End Try
Else
Try
ovDocOrd.Lines.BatchNumbers.BatchNumber = sBtchNbr
ovDocOrd.Lines.BatchNumbers.Quantity = oTotCar
Bol = False
Catch ex As Exception
VBOEM10.ExceptionManager.Publish(ex)
End Try
End If
ovRS.MoveNext()
bIsFirstBatch = False
End While
lerr = ovDocOrd.Update()
If lerr <> 0 Then
oCompany.GetLastError(lerr, cherr)
Throw New Exception(CStr(cherr))
End If
Anyone had solved this problem???
I have to find a solution quickly.
Please.
Best Regards!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is ovDocOrd a datasource ?
If so, i would check that ovDocOrd is getting initialized properly and passed the proper values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
106 | |
12 | |
10 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.