Bug 160039

Summary: Base does not show SQLException error messages
Product: LibreOffice Reporter: prrvchr
Component: BaseAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED NOTOURBUG    
Severity: normal    
Priority: medium    
Version: 7.3.2.2 release   
Hardware: All   
OS: Linux (All)   
Whiteboard: QA:needsComment
Crash report or crash signature: Regression By:

Description prrvchr 2024-03-05 04:10:24 UTC
Description:
The jdbcDriverOOo[1] driver allows you to rename table columns.
If a column is part of a view then it is possible that the underlying driver generates an exception during the SQL command allowing the column to be renamed.

The UNO interface used to perform column renaming is com.sun.star.sdbcx.XAlterTable and handles com.sun.star.sdbc.SQLException.

Wouldn't it be possible to display the SQLException message generated by the underlying driver, in order to keep the user aware of the underlying problems?

Steps to Reproduce:
1. Install jdbcDriverOOo[1] extension
2. Trying to rename a column that is part of a view.
3. The command will fail silently.

Actual Results:
The command cannot be executed but no error message appears to the user.

Expected Results:
The command cannot be executed but an error message explains the reason to the user.



Reproducible: Always


User Profile Reset: No

Additional Info:
[1] https://prrvchr.github.io/jdbcDriverOOo/
Comment 1 prrvchr 2024-03-06 13:41:05 UTC
I gave you the case where it doesn't work.

There is also the case that it works:
When renaming a table or view, try to modify the schema or catalog with a driver that does not allow this (HsqlDB, H2, SQLite, Derby) you will get an error message explaining why this cannot be done.

On the other hand, we also have problems when creating a new index if the index already exists, the error during its creation is silently ignored.
Comment 2 prrvchr 2024-03-21 04:27:29 UTC
I just fixed this problem. This came from my SQLException which did not have a SQLState and which apparently was not displayed in Base. Sorry for the inconvenience, I'm closing.