KWSTASM83 Newbie


Joined: 11 Mar 2011 Posts: 4 Location: GREECE
|
Posted: Thu Mar 17, 2011 1:56 am Post subject: refresh a form |
|
|
ubuntu 10.04
ooo 3,2
I created a database"sme" In my main table "PRO" I have two fields that are automatically updated to default values when called by a pushbutton. The code for the macro is below:
Sub Main
Dim oConnection as Object, oStatement as Object, sSQL as String, lRecordsAffected as Long
oConnection = CreateUnoService("com.sun.star.sdb.DatabaseContext").GetByName("sme").GetConnection("","")
oStatement = oConnection.createStatement()
sSQL = "UPDATE PRO SET MON = 1, NAI = FALSE"
lRecordsAffected = oStatement.executeUpdate(sSQL)
Beep
End Sub
This works, except I have to manually refresh the form in order to see the updated data. Is there a way to refresh the form into this macro?
Thank you!
 |
|