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





------- Additional comments from [EMAIL PROTECTED] Mon Oct  6 11:25:38 +0000 
2008 -------
Have tested UniVerse ODBC connection with OOo 3.0.0 OOO300m8 with some success
and some previously experienced issues remain.

1. After defining the data source it is still necessary to run the following
macro before attempting to connect to the datasource

REM  *****  BASIC  *****

Sub Main
        oDBC = createUnoService( "com.sun.star.sdb.DatabaseContext" )
        oDB = oDBC.getByName( "file:///C:/path/to/database/document.odb" )

    Dim nFilterMode as Integer
    nFilterMode = 0
    AddDataSourceSetting( oDB, "TableTypeFilterMode", nFilterMode )

    Dim bBeRespectful As Boolean
    bBeRespectful = TRUE
    AddDataSourceSetting( oDB, "RespectDriverResultSetType", bBeRespectful )

    oDB.DatabaseDocument.store()
End Sub

Function AddDataSourceSetting( oDB as Object, sSettingsName as String,
aSettingsValue as Variant ) as 

Variant
    ' append the new setting
    Dim aInfo as Variant
    aInfo = oDB.Info

    aInfo = AddInfo( aInfo, sSettingsName, aSettingsValue )

    oDB.Info = aInfo
End Function

Function AddInfo( aOldInfo() as new
com.sun.star.beans.PropertyValue,sSettingsName as String, 

aSettingsValue as Variant ) as Variant
    Dim nLower as Integer
    Dim nUpper as Integer
    nLower = LBound( aOldInfo() )
    nUpper = UBound( aOldInfo() )

    ' look if the setting is already present
    Dim bNeedAdd as Boolean
    bNeedAdd = TRUE

    Dim i As Integer
    For i = nLower To nUpper
        If ( aOldInfo( i ).Name = sSettingsName ) Then
            aOldInfo( i ).Value = aSettingsValue
            bNeedAdd = FALSE
        End If
    Next i

    ' allocate the new array
    Dim nNewSize as Integer
    nNewSize = ( nUpper - nLower )
    If bNeedAdd Then nNewSize = nNewSize + 1
    Dim aNewInfo( nNewSize ) as new com.sun.star.beans.PropertyValue

    ' copy the elements (a simply copy does not work in Basic)
    For i = nLower To nUpper
        aNewInfo( i ) = aOldInfo( i )
    Next i

    ' append the new setting, if necessary
    If ( bNeedAdd ) Then
        aNewInfo( nUpper + 1 ).Name = sSettingsName
        aNewInfo( nUpper + 1 ).Value = aSettingsValue
    End If

    AddInfo = aNewInfo()
End Function


Once this macro has been run it is then possible to connect to the database
without OOo crashing.

2. Change the database advanced settings not to use Catalog name 

Thereafter it is possible to create an SQL  using Create Query in SQL View and
selecting Run SQL command directly.

Remaining problems include:

When using Create Query in Design View, all the tables and columns are shown and
can be joined and columns selected for the query.  However on running the query
or when attempting to switch design view off OOo crashes.

The Query Wizard crashes on "Finish" with the following error dialog

Runtime Error! 
Program c:\Program Files\OpenOffice.org 3\program\soffice.bin
R6025
- pure virtual fucntion call


---------------------------------------------------------------------
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]

Reply via email to