To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=53438





------- Additional comments from [EMAIL PROTECTED] Wed Aug 17 08:07:44 -0700 
2005 -------
You misunderstood me. I don't won't to overwrite the *.odb!
I want to overwrite the Database-file itself, in my case the Calcfile.
The ODB should be the same!

It's quite plain to me, that i can not overwrite a file that ist opened
(connected), but how should i know in my macro if a connection is established to
a datasource or not. And how can i close a connection?

I can try to give a Step-by-Step but my macro has about 350 lines.
First take a Calc-File and create a datasource. Register it!
Save the *.odb-File
When it's registered right, then make a new Writer-document. Insert a "field"
command, a serial letter field with datas of the datasource.
Then run this macro:

Sub Main

'Variablendefinition
DIM oDoc as Object
DIM FileProporties(2) as New com.sun.star.beans.PropertyValue
DIM SaveProporties(1) as New com.sun.star.beans.PropertyValue

FileProporties(0).Name = "Filtername"
FileProporties(0).Value = "Calc"
FileProporties(1).Name = "FilterOptions"
FileProporties(1).Value = ""
FileProporties(2).Name = "Hidden"
FileProporties(2).Value = False

oDoc = StarDesktop.loadComponentFromURL("file:///C:/temp/steuerda.ods",
"_blank", 0, FileProporties())

SaveProporties(0).Name = "Overwrite"
SaveProporties(0).Value = True
SaveProporties(1).Name = "Filtername"
SaveProporties(1).Value = "Calc"

oDoc.storeAsURL("file:///C:/temp/steuerda.ods", SaveProporties())
oDoc.close(false)

End Sub

A Exception occurs in the line of "storeAsURL".
In OO1.1.4 i always can overwrite the database itself (Of course not the *.odb)!

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to