[Libreoffice-bugs] [Bug 115988] New: "DataSource.ConnectWithCompletion" function not working since 6.x

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Feb 24 10:31:28 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=115988

            Bug ID: 115988
           Summary: "DataSource.ConnectWithCompletion" function not
                    working since 6.x
           Product: LibreOffice
           Version: 6.0.1.1 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: alessandro.tassi at gmail.com

Description:
When trying to perform connection from a basic script, Libreoffice freezes and
stops running.
I've isolated the string causing this problem moving a "msgbox" alert through
the basic code, that's the following:

Connection = DataSource.ConnectWithCompletion(InteractionHandler)

I attach the whole macro including this command.

It's very usefull to perform connection from a macro script as you may want to
open a form containing data on Libreoffice Base startup.

This problem has appeared first when moving from Libreoffice 5 to 6 series.

Thanks a lot.

Alessandro T.

Steps to Reproduce:
'This cod has been working for 4 years since upgrading to Libreoffice 6.x.
'Now the last command blocks everything: Connection =
'DataSource.ConnectWithCompletion(InteractionHandler)

'mysql db name: finanziamenti
'mysql Libreoffice registered name: soviet
'file name: soviet.odb


Function connect
sqlpath="C:\Programmi\MariaDB 10.1\bin\"
NomeDB = "finanziamenti"
Dim DocDBPath as String
DatabaseContext = createUnoService("com.sun.star.sdb.DatabaseContext")
DataSource = DatabaseContext.getByName("soviet")
DocDBPath = DataSource.DatabaseDocument.Location
GlobalScope.BasicLibraries.loadLibrary("Tools")
BaseDir = Tools.Strings.DirectoryNameoutofPath(DocDBPath,"/")
DocDB = DataSource.DatabaseDocument
If Not IsNull(Connection) Then GoTo esci
If Not DataSource.IsPasswordRequired Then
  Connection = DataSource.GetConnection("","")
Else
  InteractionHandler = createUnoService("com.sun.star.sdb.InteractionHandler")
  Connection = DataSource.ConnectWithCompletion(InteractionHandler) 
'<-------PROBLEM
End If
esci:
End Function

Actual Results:  
I think the same problem occurs with every DB connection, MySql in this case.

Expected Results:
Libreoffice freezes


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Connect normally with the DB asking name and password, and allowing to see DB
data when opening tables and forms.


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101
Firefox/58.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180224/355e5399/attachment-0001.html>


More information about the Libreoffice-bugs mailing list