Created attachment 142272 [details] Error message and details. I'm trying to access an MS SQL Server database from within Libreoffice Calc. I can run queries with sqsh, but I need to find relationships between tales, and digging in the raw data doesn't seem to bring much success. LibreOffice Base 5 connects to my database and lists the tables, but when I try to access any of them, it shows an error message: --- The data content could not be loaded. --- SQL Status: 42000 Error code: 102 [FreeTDS][SQL Server]Incorrect syntax near 'CITRON2015'. --- And displays an empty table.
Could you give a try to a recent LO version? Latest ones are: - stable branch: 5.4.7 - last branch/evolution: 6.0.4 Indeed, 5.1.X, 5.2.X, 5.3.X versions are EOL.
More details in a question I've posted: https://ask.libreoffice.org/en/question/156010/help-problems-accessing-a-microsoft-sql-server-database/
(In reply to Julien Nabet from comment #1) > Could you give a try to a recent LO version? > Latest ones are: > - stable branch: 5.4.7 > - last branch/evolution: 6.0.4 > > Indeed, 5.1.X, 5.2.X, 5.3.X versions are EOL. I've tried to reproduce this with the 6.0.4 release, but I didn't get so far, as I've had another problem occur on my way: https://bugs.documentfoundation.org/show_bug.cgi?id=117798
Ok I put the other tdf on See also. In your ask.libreoffice link, I saw you tried jdbc but didn't know what to put. https://docs.microsoft.com/en-US/sql/connect/jdbc/building-the-connection-url?view=sql-server-2017 may help?
(In reply to Julien Nabet from comment #4) > Ok I put the other tdf on See also. > > In your ask.libreoffice link, I saw you tried jdbc but didn't know what to > put. > https://docs.microsoft.com/en-US/sql/connect/jdbc/building-the-connection- > url?view=sql-server-2017 may help? Dear Tobiasz Karoń, Did you try what Julien is suggesting? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the issue is still present
Dear Bug Submitter, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INSUFFICIENTDATA due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-NeedInfo-Ping-20190111
I am running LibreOffice 6.0.7.3 on Ubuntu 18.04.01. I experience the exact same problem trying to issue queries against MS SQL servier via ODBC. LibreOffice can successfully connect to MS SQL server, and can also browse the database tables. But when trying to execute a specific SQL query I get the same error dialog as the OP.
On Win7 with master sources updated some days ago + JDBC jtds driver, no problem to list, browse and query tables. Vegard/Tobiasz: any update with 6.1.5 or brand new 6.2.0? Tobiasz: difficult to tell if the pb may come from freeTds or LO. Vegard: I can't succeed in defining odbc connection with Windows tool (for DB SQL Server 2012) so stuck to give a try to odbc part.
With my very limited Windows knowledge, I tried to enable tracing on the MS SQL Server side using "SQL Server Profiler". Watching the traces in "SQL Server Profiler" I first try using sqsh from the command line. This works fine, and the SQL statement is traced as: select name from aboreg; When I run the equivalent (non-working) statement within LibreOffice, I notice that the traced statement is: select "name" from "aboreg"; Suspecting that the quotes may cause problems, I tried running the same statement (with the quotes) in sqsh. This also works fine.
A new major release of LibreOffice is available since this bug was reported. Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
I installed Version: 6.2.5.2 on Ubuntu 18.04 Build ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159 The error is still present, with symptoms like before.
Tobiasz: can you give an update? Your bug 117798 was closed due to no activity.
I am now using Libreoffice version 6.0.7.3 Using ngrep to capture some network packets when running query from within Libreoffice gives the following: ... "Cable" FROM "TM_DB"."dbo"."Mytable" AS " ... Incorrect syntax near 'TM_DB' Running a similar query directly with isql returns a similar error message: SQL> select "cable" from "TM_DB"."dbo"."mytable"; [37000][FreeTDS][SQL Server]Incorrect syntax near 'TM_DB'. Removing the quotes from the query works fine in isql: select "cable" from "TM_DB"."dbo"."mytable"; SQL> select cable from TM_DB.dbo.mytable; So, it seems the problem is related to the handling of quoting in SQL statements.
(In reply to Vegard Vesterheim from comment #13) > I am now using Libreoffice version 6.0.7.3 > ... 6.0, 6.1, 6.2 and 6.3 branches are EOL Last stable LO version is 6.4.7 and brand new one 7.0.3
Installed libreoffice 7.0.2 from debian buster-backports: Same problem: [FreeTDS][SQL Server]Incorrect syntax near 'TM_DB'. /build/libreoffice-ajS1GV/libreoffice-7.0.2/connectivity/source/drivers/odbc/OTools.cxx:357
Hello Tobiasz, Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ? I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Dear Tobiasz Karoń, This bug has been in NEEDINFO status with no change for at least 6 months. Please provide the requested information as soon as possible and mark the bug as UNCONFIRMED. Due to regular bug tracker maintenance, if the bug is still in NEEDINFO status with no change in 30 days the QA team will close the bug as INSUFFICIENTDATA due to lack of needed information. For more information about our NEEDINFO policy please read the wiki located here: https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO If you have already provided the requested information, please mark the bug as UNCONFIRMED so that the QA team knows that the bug is ready to be confirmed. Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-NeedInfo-Ping
Dear Tobiasz Karoń, Please read this message in its entirety before proceeding. Your bug report is being closed as INSUFFICIENTDATA due to inactivity and a lack of information which is needed in order to accurately reproduce and confirm the problem. We encourage you to retest your bug against the latest release. If the issue is still present in the latest stable release, we need the following information (please ignore any that you've already provided): a) Provide details of your system including your operating system and the latest version of LibreOffice that you have confirmed the bug to be present b) Provide easy to reproduce steps – the simpler the better c) Provide any test case(s) which will help us confirm the problem d) Provide screenshots of the problem if you think it might help e) Read all comments and provide any requested information Once all of this is done, please set the bug back to UNCONFIRMED and we will attempt to reproduce the issue. Please do not: a) respond via email b) update the version field in the bug or any of the other details on the top section of our bug tracker Warm Regards, QA Team MassPing-NeedInfo-FollowUp