Update date

Good evening. I have a listbox where I upload the data linked to a database. And a series of textboxes that make it easier for me to enter data. The listbox is invisible. When I edit a textbox I run the RecordUpdate.SaveRow command, but it doesn’t update me anything. If I close the form and reopen it I find the updated data … it would take something like listbox.refresh?

What purpose does the listbox serve? You say it is invisible. What is the code with the .SaveRow? What should be being updated?

I save the contents of the textboxes in the database. But I don’t have an immediate refresh, I have to close the form and reopen it to get the updated data. I’m definitely missing something … here’s a portion of the code:

rows2 = db.SelectSQL(sql)
rows2.EditRow
rows2.Column(“Nome”).StringValue=textArticolo.text
rows2.Column(“Descrizione”).StringValue=textMessaggio.text
rows2.SaveRow

But you say the listbox is invisible. So what is it for?

The textboxes are already updated (because you typed new values there) and are visible.

Ok, not being a very good programmer I did this. I connected the listbox to the database and then I read the rows and cells, copying the data I need to the textboxes. Then, when I edit the textbox, I register the data on the database and I would have to update the contents of the listbox, which does not update. It only works if I close and reopen the form. I’m definitely doing something wrong. When I press the refresh button, the database is updated, but the changes are not displayed until I close and reopen the form.

I just solved it, the problem was that I was not emptying the listbox after the update. Now works. Thanks for your interest.

I still don’t see the purpose of the listbox. Populate the textboxes from the database, then, after altering the textbox values, write them back to the databaase. No need for an invisible listbox at all.