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

[API - BASE] Register Database, locked after connect

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
raiserle
Newbie
Newbie


Joined: 10 Aug 2012
Posts: 1

PostPosted: Fri Aug 10, 2012 3:44 pm    Post subject: [API - BASE] Register Database, locked after connect Reply with quote

Hi,

i've tried this, to register a database in OOo.
Code:

   DatabaseContext = createUnoService( "com.sun.star.sdb.DatabaseContext" )
   DataSource         = DatabaseContext.getByName( "file:///f:/tmp/testdb.odb" )
   DatabaseContext.registerObject( "TEST", DataSource )
.

When i connect the datasource via ....getByName( "TEST" ) an release the datasource ( makro-ide not closed ) - is this locked .. when i open the file via base.
The file "testdb.odb.lck" will not created after connect.

On this way: the datasourece is not locked in base after connect from makro-ide.
Register the datasource via GUI from OOo with name "TEST", connect the datasource via ... getByName( "TEST" ), and relese the connection ( makro-ide not closed ).
The file "testdb.odb.lck" will create by connecting via macro or base.

What is wron on my code?


regards
raiserle
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 Macros and API 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