As explained earlier I tried to insert a new row with the following code it is working perfectly for the table "liste article"
but when I try to do the same with the table "liste etcdeclient" its not working try to explain me the reason, if anyone can help me.
VB.NET:
ligart = dataset.Tables("liste article").NewRow
'ligart("code") = "test"
'ligart("CODEBARRE") = "Test"
'ligart("nom") = "test"
'ligart("TYPE") = "U"
'dataset.Tables("liste article").Rows.Add(ligart)
'cmdbuild2 = New OdbcCommandBuilder(reqarticle)
'Try
' reqarticle.Update(dataset, "liste article")
'Catch ex As Exception
' MsgBox(ex.message)
'End Try
'dataset.Clear()
'charger()
but when I try to do the same with the table "liste etcdeclient" its not working try to explain me the reason, if anyone can help me.
VB.NET:
liget = dataset.Tables("liste etcdeclient").NewRow
'ligdefste = resreqdefste.Rows(0)
'liget("RTCFIELD1") = 1234 'Trim(Mid(Lignes(i), 44, 35))
'liget("codedocutil") = 315 ' ligdefste("numclientcde") + 1
liget("code") = 800
'liget("type") = "CC"
'liget("datedoc") = Today
liget("tarif") = 1
'liget("CategorieAV") = "0"
'liget("Depot") = "DP"
'liget("calculTVA") = True
'liget("GestionTPF") = True
'liget("PieceTrans") = False
'liget("PieceEdit") = False
dataset.Tables("liste etcdeclient").Rows.Add(liget)
cmdbuild2 = New OdbcCommandBuilder(reqetclient)
reqetclient.InsertCommand = cmdbuild2.GetInsertCommand
Try
reqetclient.Update(dataset, "liste etcdeclient")
Catch ex As Exception
MsgBox(ex.Message)
End Try
dataset.Clear()
charger()
Last edited by a moderator: