Bug 128591 - ODBC/SQL Server/datetimeoffset column breaks form creation wizard
Summary: ODBC/SQL Server/datetimeoffset column breaks form creation wizard
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Database-Connectivity
  Show dependency treegraph
 
Reported: 2019-11-04 18:02 UTC by Bill Stewart
Modified: 2022-06-23 03:48 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Stewart 2019-11-04 18:02:11 UTC
Platform: Windows 10 1803/LibreOffice 6.3.3.2/x64/AdoptOpenJDK 1.8.0_212 x64

I created a Base database that uses an ODBC connection to pull data from a SQL Server 2012 database. This works without any issues (can view table and create queries, and these return data without problems). The server table I am querying contains 2 columns with the 'datetimeoffset' type.

The problem is the 'Use Wizard to Create Form...' tool. I use the following steps:

1. Click 'Use Wizard to Create Form...'

2. I select my query from the 'Tables or queries' drop-down list

3. I click '>>' to add all columns, then click 'Next >'

4. I don't need any subforms, so I click 'Next >'

5. I choose the second option ("Columnar - Labels on Top") option for the main form arrangement, then click 'Next >'

6. I select 'This form is to display all data' and select all 3 checkboxes to prevent data modification, then click 'Next >'

7. Don't care about style; click 'Next >'

8. For the form name, enter whatever name, then click 'Finish'

After clicking 'Finish', the wizard retains focus and no blocking occurs (I can click '< Back' and 'Next >' buttons, interact with the wizard pages, etc.), but nothing else happens. The 'Finish' button simply doesn't do anything, and no columns appear in the underlying form.

If I omit the 2 columns containing the 'datetimeoffset' data type, I can see the columns appear in the underlying form and I can complete the wizard successfully.
Comment 1 Alex Thurgood 2019-11-06 10:39:13 UTC
This rings a bell.

Something similar reported in bug 119139 (different database and different driver, but similar timestamp display issues)
Comment 2 Alex Thurgood 2019-11-06 10:41:01 UTC
@Bill : how are the datetimeoffsets created ?
Comment 3 Bill Stewart 2019-11-06 14:45:30 UTC
@Alex - the datetimeoffset values come from Active Directory and get added to the table using a PowerShell script that uses the PowerShell module (the script casts the to DateTimeOffset); 'INSERT INTO tablename (columnname...) VALUES (data...)'
Comment 4 QA Administrators 2019-11-07 03:36:24 UTC Comment hidden (obsolete)
Comment 5 Alex Thurgood 2019-11-07 09:04:04 UTC
@Bill, thanks for the info.

I'm guessing our wizard code doesn't know how to handle the datetimeoffset data type, having looked at some examples here:

https://www.sqlservercentral.com/articles/the-sql-server-2008-datetimeoffset-data-type

From what I understand (and I'm not an expert), the form creation wizard code tries to parse the datatype and assign a corresponding form control.
Either it is unable to parse the datatype or else it can't decide on a control to assign to the form for that datatype and then barfs on it. Clearly neither of these two scenarios is desirable.

I don't have a setup that allows me to test this unfortunately, so can't bring this any further.

Adding some people to CC who might.
Comment 6 Alex Thurgood 2019-11-07 09:05:05 UTC
@Lionel : don't remember now whether you had access to a SQL Server instance, but would welcome your thoughts anyway.
Comment 7 Xisco Faulí 2021-11-23 11:02:15 UTC
Hello Bill,
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.
Comment 8 QA Administrators 2022-05-23 03:38:13 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2022-06-23 03:48:22 UTC
Dear Bill Stewart,

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