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
Hi, I forgot to specify the type of DB: it's MariaDB 10.1.31-1 on x86_64 Arch Linux laptop, connected by Oracle Mysql Connector Java: mysql-connector-java-5.1.38-bin.jar . Upgrading to mysql-connector-java-5.1.45.zip doesn't solve anything, the same using the development version 8.0.9-rc. Thanks again Alessandro
I've tryed also using MariaDB java connection (https://mariadb.com/kb/en/library/about-mariadb-connector-j/#getting-a-new-connection), changing the connection class from "com.mysql.jdbc.Driver" to "org.mariadb.jdbc.Driver". The problem i still there.
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.) I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Have tried this one with OpenSUSE 42.3 64bit rpm Linux and LO 6.0.0.3, LO 6.0.1.1 and LO 6.0.2.1 I changed the code, because there are many lines without any function for the bug-description: SUB ConnectDB oDatasource = ThisComponent.DataSource If Not oDatasource.IsPasswordRequired Then Connection = oDatasource.GetConnection("","") Else InteractionHandler = createUnoService("com.sun.star.sdb.InteractionHandler") Connection = oDatasource.ConnectWithCompletion(InteractionHandler) End If END SUB There must be an external database, which needs a username and password. I tried with MariaDB on my system. I put the code into the *.odb-file, started the code and got the dialog for input password. No problems here with any tested LO-version to connect to the MariaDB this way.
Hi, I've upgraded to Version: 6.0.2.1.0+ Build ID: 6.0.2-1 and the problem seems solved. Maybe you don't find any matter because you let LO to find the connection by itself and to ask for password? The problem appeared launching a startup script (Tools > Customize > Events > associating script to "Document Loading Finished" event) or running it from a button. But now it seems working. Thanks a lot. Alessandro
Let's use status WORKSFORME, since the fixing change is unknown.