Cannot save more than 1 row what is my problem

Var row As New DatabaseRow
// ID will be updated automatically

row.Column(“DossierNo”) =order.N°Dossier.text
row.Column(“BonDeTravail”) = order.BonDeTravail.text
row.Column(“Nom”) = order.nom.text
row.column(“Adresse”)=order.adresse.text
row.column(“bureau”)=order.bureau.text
row.column(“ville”)=order.ville.text
row.column(“province”)=order.province.text
row.column(“CodePostal”)=order.CodePostal.text
row.column(“Téléphone”)=order.Téléphone.text
row.column(“Poste”)=order.Poste.text
row.column(“Courriel”)=order.Courriel.text
row.column(“PersRess”)=order.PersRess.text
row.column(“vendeur”)=order.vendeur.text
row.Column(“DateOuverture”) =order.DateOuverture.text
row.Column(“DateRequise”) = order.DateRequise.text
row.Column(“Soumission”) = order.Soumission.text
row.column(“description”)=order.Desc.text
row.column(“CommClient”)=order.commclient.text
row.column(“commcourtier”)=order.commcourtier.text
row.column(“prixvente”)=order.prixvente.text

Try
JobData.AddRow(“customers”, row)
JobData.CommitTransaction
Catch error As DatabaseException
MessageBox("Error: " + error.Message)
JobData.RollbackTransaction
End Try

What type of DB do you use? Please post the entire code block. There should be a loop if more than one row shall be written to DB.

Sqlite

There are a lot of people on the forum that can help you. Thing is, you dont provide enough information about your issue. The minimum you should always tell is:

  • The OS on which you work, exact version
  • The Xojo version you use
  • Thoroughly explanation of what your are trying to do

In this thread you say that “you can’t save more than one row”, but then what is/are the error message(s) you get ?

The more details you provide the better the chances we can help you rapidly. Torsten comment is right about posting the entire code block.

Thanks

You’re only trying to write one row, so no surprise that only one gets written.

2 Likes