Adding a Record

Listed below is the code I am using to add records to a SQLite table. The same code worked fine on my other tables but for some reason this will not.
If txtAddress.Text <> “” Then
If cboxCodeId.Text <> “” Then
Dim dr As New DatabaseRecord

  dr.Column("BookAcct") = txtBookAcctCombo.Text
  dr.Column("MeterId") = txtMeterId.Text
  dr.Column("CrrReadin") = txtCurrRdg.Text
  dr.Column("Address") = txtAddress.Text
  dr.Column("CustName") = txtCustName.Text
  dr.Column("Location") = txtLocation.Text
  dr.Column("Book") = LabelBook.Text
  dr.Column("Account") = LabelAccount.Text
  dr.Column("Desc") = cboxCodeId.Text
  dr.Column("Notes") = txtNotes.Text
  dr.Column("EntDate") = txtDate.Text
  DB.InsertRecord("WorkOrders", dr)
  If DBError Then MsgBox("An Error Occured: " + DB.ErrorMessage)
End If

End If

I receive no error from the DBError procedure. The only difference from this table and the others that are working is they have less fields in a record. Is there a limit to SQLite?

Any comments would be appreciated.

What is the DBError method? Also, I would check DB.Error after each operation. A quick way to figure out what’s going on here is to run the program in the debugger with a breakpoint set right on DB.SQLExecute("BEGIN TRANSACTION")

I’m sure you are getting a DB.Error, but you check it in the wrong place. You are checking it after the Commit, which certainly did not have an error. Instead, check it directly after the DB.InsertRecord line.

Thanks for the suggestions. I will move the error checking and see what happens

Jeremy & Paul, Thanks for the advice. It worked after I moved the error check. I was able to view the error then.