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

getConnection problem

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


Joined: 17 Jul 2007
Posts: 1
Location: UK

PostPosted: Wed Jul 18, 2007 10:17 am    Post subject: getConnection problem Reply with quote

I'm new to this and inevitably have run straight into a problem.

I've created a database and defined a table but as yet the table is empty.

I'm planning on writing a macro to populate this table but I keep getting an error from the getConnection.

the code is

sDBURL = "file:///C:\Documents and Settings\Russ\My Documents\New Database.odb"
oBaseContext = CreateUnoService("com.sun.star.sdb.DatabaseContext")
oDB = oBaseContext.getByName(sDBURL)
oCon = oDB.getConnection("", "")


The getConnection gives the following error

BASIC runtime error.
An exception occurred
Type: com.sun.star.sdbc.SQLException
Message: No storage property was set..

Storage property!
I didn't see anything in the instructions about that.
Anyone any ideas?

Thanks

Russ
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