OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

refresh a form

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
KWSTASM83
Newbie
Newbie


Joined: 11 Mar 2011
Posts: 4
Location: GREECE

PostPosted: Thu Mar 17, 2011 1:56 am    Post subject: refresh a form Reply with quote

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?
Rolling Eyes

Thank you!
Laughing
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Thu Mar 17, 2011 2:24 am    Post subject: Reply with quote

Hello

See here.

Romke
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group