<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - "DataSource.ConnectWithCompletion" function not working since 6.x"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=115988">115988</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"DataSource.ConnectWithCompletion" function not working since 6.x
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.0.1.1 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>BASIC
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>alessandro.tassi@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>