Hi there,

I've been working with 2.0.2 for a while now and just upgraded to 2.0.3.
After upgrading my scripts don't work any longer.

I'm accessing my Sybase SQL Anywhere 8 Server through ODBC.
This simple scripts shows the issue:

Sub Test
Dim oStatement as Object, sQuelle as String, sUser as String, sPW as String
Dim oState as Object, oDatabaseContext as Object, oDatenquelle as Object
Dim     sSQL as String, oResult as Object, oDVerb as Object
        sQuelle = "database"
        sUser = "user"
        sPW = "***"
        
        oDatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext")
        If oDatabaseContext.hasByName(sQuelle) then
                oDatenquelle = oDatabaseContext.getByName(sQuelle)
                oDVerb = oDatenquelle.getConnection(sUser,sPW)
                oStatement = oDVerb.createStatement()
oStatement.ResultSetType = com.sun.star.sdbc.ResultSetType.SCROLL_SENSITIVE oStatement.ResultSetConcurrency = com.sun.star.sdbc.ResultSetConcurrency.UPDATABLE
                oStatement.EscapeProcessing = True

                ' read data from first table
                sSQL = "SELECT FIRST ID FROM Daten"
                oResult = oStatement.executeQuery(sSQL)
                If not isNULL(oResult) and oResult.Next() then
                        MsgBox("First table data: " & oResult.getInt(1), 64, 
"Database Test")
                End If
                ' Result: MsgBox displays data

                ' read data from second table
                sSQL = "SELECT FIRST ID FROM Mitarbeiter"
                oResult = oStatement.executeQuery(sSQL)
' in 2.0.3 I'll get a runtime error here: Exeption - com.sun.star.lang.DisposedExeption (no further message)
                ' oStatement still exists
                ' in 2.0.2 it works
                If not isNULL(oResult) and oResult.Next() then
                        MsgBox("Second table data: " & oResult.getInt(1), 64, 
"Database Test")
                End If
                oStatement.close()
                oDVerb.close()
        Else
                MsgBox("Datenquelle '" & sQuelle & "' nicht vorhanden, 
Programmabbruch!")
        End if
End Sub

Looks like you've changed the db-handling somehow. I couldn't find any changelog, so please help.

IDL reference says: "This exception occurs if the object behind this interface has been disposed before and can't uphold its method specification anymore."
But oStatement still exists, so what is wrong with the new version ?

Thank you for your help, Rado

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

Reply via email to