Sqlite select and updating a WebListBox

When I run my app I open a page and the Action reads a select statement and populates a web list box. I can then enter data into entire fields and save the data and add the data to the WebListBox.

My challenge is that the automatic ID is read from the database and populates the column in the WebListBox but when I update the WebListBox it does not populate the ID column because I have not instantiated a value for SQLiteDatabase.LastRowID().

I cannot do this because I end up with two methods called BBDataListBox.AddRow(…) that are different and Xojo can’t tell them apart.

I want to update the WebListBox row including the ID column without having to re-read the database because it’s a web app and I want to keep traffic to a minimum.

Any thoughts would be appreciated.

PageName.on open
If data <> Nil Then
While Not data.EOF
BBDataListBox.AddRow(data.Field(“ID”).StringValue, data.Field(“Descriptor”).StringValue)
End If
//This works fine and populates the WebListBox.

//This works fine because BBDataListBox.AddRow is “hidden” inside a case statement. The ID column is blank because BBLastRowID() is not instantiated at this point.
If AddItemsRow(BBItemType,BBDescriptorText.Text) Then
MsgBox(“Add to List succeeded.”)
MsgBox(“There was an error adding the data.”)
End If
// This calls the AddItemsRow method to update the database and this works fine.

The problem comes because I need to have the BBDataListBox.AddRow(BBLastRowID,BBDescriptorText.Text) statement after the call to the AddItemsRow method (not inside the case statement) so I can find the LastRowID but that then means there are two BBDataListBox.AddRow statements with different parameters.