Beanshell to connect to Base table

Hello,

I am trying to make a Beanshell macro in Base to connect to a table called schools. Here is my sample code:

oDoc = UnoRuntime.queryInterface(XModel.class,XSCRIPTCONTEXT.getInvocationContext());
if ( oDoc == null )
  oDoc = XSCRIPTCONTEXT.getDocument();
oConn = oDoc.getCurrentController().connect("","");
oStmt = oConn.createStatement();
oStmt.executeUpdate( "update ""schools"" set ""name""='Name of School'  where ""ID""=1012" );
// BeanShell OpenOffice.org scripts should alsysways return 0
return 0;

I don’t see any error, but it does not update. Can you please let me know what I am doing wrong?

Cross posted to OpenOffice forum where response has been made.