minizao
16th February 2005, 21:03
Hi all,
I need to fill in session tdsls4120m000 the field tdsls045.dqua or tdsls045.bqua, i did the following function and it's not working.
I don't know where is problem.
Can anyone help me... pleaaasssseeeeee :cool:
i have some questions :
(1) I have to execute find when i fill "Order Number" and "Position" and then Get?
(2) I need to fill Date field?
(3) To submit this values i did this :
3.1 - Mark current record, it's correct how i did it?
3.2 - Executed Update
3.3 - Executed Save
3.4 - End session
Are those the correct steps to submit the values that i have inserted?
Public Sub ManterEntregas(ByVal OrdVenda As String, ByVal NrPosicao As String, ByVal QtdEntregue As String, ByVal DataEntrega As String)
Dim Ret, ErrMessage1 As String
dllName = BAANManterEntregasdll
'Fill field orno
dllFunction = "tdsls4120m000f.put.Ordem_de_venda.tdsls045.orno(" + OrdVenda + ")"
Call SendToBAAN(dllName, dllFunction)
'Fill field pono
dllFunction = "tdsls4120m000f.put.N_mero_de_posi_o.tdsls045.pono(" + NrPosicao + ")"
Call SendToBAAN(dllName, dllFunction)
'Find fields
dllFunction = "tdsls4120m000f.find()"
Call SendToBAAN(dllName, dllFunction)
MsgBox("find : " + BAANObj.returnvalue.ToString)
'1 - Exist
'Get fild orno
dllFunction = "tdsls4120m000f.get.Ordem_de_venda.tdsls045.orno()"
Call SendToBAAN(dllName, dllFunction)
'Get field pono
dllFunction = "tdsls4120m000f.get.N_mero_de_posi_o.tdsls045.pono()"
Call SendToBAAN(dllName, dllFunction)
'Fill field dqua
dllFunction = "tdsls4120m000f.put.Qtd._entregue(" + QtdEntregue + ")"
Call SendToBAAN(dllName, dllFunction)
'Fill field ddat
dllFunction = "tdsls4120m000f.put.Data_entrega(" + DataEntrega + ")"
Call SendToBAAN(dllName, dllFunction)
'Fill field bqua
dllFunction = "tdsls4120m000f.put.Pendente(0.00)"
Call SendToBAAN(dllName, dllFunction)
'Function to mark the current record in session tdsls4120m000
ErrMessage1 = "errmessage1"
dllFunction = "tdsls4120m000f.mark(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
Call SendToBAAN(dllName, dllFunction)
'Function to update a record in session tdsls4120m000
'Record must be made current and fields to be changed before calling this function
ErrMessage1 = "errmessage1"
do_update = "1"
dllFunction = "tdsls4120m000f.update(" + do_update + "," + Chr(34) + ErrMessage1 + Chr(34) + ")"
Call SendToBAAN(dllName, dllFunction)
'Function to save an update/insert/delete in session tdsls4120m000
ErrMessage1 = "errmessage1"
dllFunction = "tdsls4120m000f.save(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
Call SendToBAAN(dllName, dllFunction)
Ret = BAANObj.ReturnValue.ToString
ErrMessage1 = BAANObj.FunctionCall.ToString
If Ret <> "1" Then
MsgBox("Update with SUCCESS...")
Else
MsgBox("ERROR UPDATING...")
End If
ErrMessage1 = "errmessage1"
dllFunction = "tdsls4120m000f.end(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
Call SendToBAAN(dllName, dllFunction)
'Disconnecting from BAAN
DisconnectBAAN()
End Sub
Best regards,
Nuno Mota
I need to fill in session tdsls4120m000 the field tdsls045.dqua or tdsls045.bqua, i did the following function and it's not working.
I don't know where is problem.
Can anyone help me... pleaaasssseeeeee :cool:
i have some questions :
(1) I have to execute find when i fill "Order Number" and "Position" and then Get?
(2) I need to fill Date field?
(3) To submit this values i did this :
3.1 - Mark current record, it's correct how i did it?
3.2 - Executed Update
3.3 - Executed Save
3.4 - End session
Are those the correct steps to submit the values that i have inserted?
Public Sub ManterEntregas(ByVal OrdVenda As String, ByVal NrPosicao As String, ByVal QtdEntregue As String, ByVal DataEntrega As String)
Dim Ret, ErrMessage1 As String
dllName = BAANManterEntregasdll
'Fill field orno
dllFunction = "tdsls4120m000f.put.Ordem_de_venda.tdsls045.orno(" + OrdVenda + ")"
Call SendToBAAN(dllName, dllFunction)
'Fill field pono
dllFunction = "tdsls4120m000f.put.N_mero_de_posi_o.tdsls045.pono(" + NrPosicao + ")"
Call SendToBAAN(dllName, dllFunction)
'Find fields
dllFunction = "tdsls4120m000f.find()"
Call SendToBAAN(dllName, dllFunction)
MsgBox("find : " + BAANObj.returnvalue.ToString)
'1 - Exist
'Get fild orno
dllFunction = "tdsls4120m000f.get.Ordem_de_venda.tdsls045.orno()"
Call SendToBAAN(dllName, dllFunction)
'Get field pono
dllFunction = "tdsls4120m000f.get.N_mero_de_posi_o.tdsls045.pono()"
Call SendToBAAN(dllName, dllFunction)
'Fill field dqua
dllFunction = "tdsls4120m000f.put.Qtd._entregue(" + QtdEntregue + ")"
Call SendToBAAN(dllName, dllFunction)
'Fill field ddat
dllFunction = "tdsls4120m000f.put.Data_entrega(" + DataEntrega + ")"
Call SendToBAAN(dllName, dllFunction)
'Fill field bqua
dllFunction = "tdsls4120m000f.put.Pendente(0.00)"
Call SendToBAAN(dllName, dllFunction)
'Function to mark the current record in session tdsls4120m000
ErrMessage1 = "errmessage1"
dllFunction = "tdsls4120m000f.mark(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
Call SendToBAAN(dllName, dllFunction)
'Function to update a record in session tdsls4120m000
'Record must be made current and fields to be changed before calling this function
ErrMessage1 = "errmessage1"
do_update = "1"
dllFunction = "tdsls4120m000f.update(" + do_update + "," + Chr(34) + ErrMessage1 + Chr(34) + ")"
Call SendToBAAN(dllName, dllFunction)
'Function to save an update/insert/delete in session tdsls4120m000
ErrMessage1 = "errmessage1"
dllFunction = "tdsls4120m000f.save(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
Call SendToBAAN(dllName, dllFunction)
Ret = BAANObj.ReturnValue.ToString
ErrMessage1 = BAANObj.FunctionCall.ToString
If Ret <> "1" Then
MsgBox("Update with SUCCESS...")
Else
MsgBox("ERROR UPDATING...")
End If
ErrMessage1 = "errmessage1"
dllFunction = "tdsls4120m000f.end(" + Chr(34) + ErrMessage1 + Chr(34) + ")"
Call SendToBAAN(dllName, dllFunction)
'Disconnecting from BAAN
DisconnectBAAN()
End Sub
Best regards,
Nuno Mota