Is it correct, that "oDatabaseContext.getElementNames()" will return the 
displayed name
(shown in database brwoser)  and not the "registered Name" shown in Tools - 
Options ?

for example the macro below will return "My Database", not "mydatabase"

<node oor:name="RegisteredNames">
        <node oor:name="My Database" oor:op="replace">
                <prop oor:name="Location" oor:type="xs:string">
                        <value>file:///X:/MyDatabase.odb</value>
                </prop>
                <prop oor:name="Name" oor:type="xs:string">
                        <value>mydatabase</value>
                </prop>
        </node>
</node>


OPTION EXPLICIT
Sub Test()

        Dim oDatabaseContext as Object
        Dim oNames()
        Dim s as String
        Dim i as Integer

        oDatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext")

        oNames = oDatabaseContext.getElementNames()

        For i = 0 To UBound(oNames())
                s = s & Chr(13) & oNames(i)
        Next i

        MsgBox s
End Sub

Oliver

-- 

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to