Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

EDatabaseError while opening MSSQL temporal tables

matsg's profile image matsg posted 2 months ago in General Permalink

HeidiSQL throws an exception when trying to view a Microsoft SQL Server temporal table. (For reference, see https://learn.microsoft.com/en-us/sql/relational-databases/tables/temporal-tables?view=sql-server-ver16).

It's kind of weird, the moment you click the "Data" tab to view the table contents, it throws an EDatabaseError saying "List index out of bounds (nn)."

The problem should be easily reproducible with a docker MSSQL image from Microsoft, and a sample system-versioned (temporal) table created.

It's just maddening because HeidiSQL is so awesome, even for SQL Server, but as we migrate more and more of our tables to temporal tables, I can use it ever less. Being forced to use SSMS is like having to do numerical methods with an abacus.

HeidiSQL version 12.3.0.6589.

Stack trace:

main thread ($692c):
009e9505 heidisql.exe Data.DB                   DatabaseError
009ecf56 heidisql.exe Data.DB                   TFieldsGetFieldError
009ecfdb heidisql.exe Data.DB                   TFields.GetField
00c9e584 heidisql.exe dbconnection    9114   +8 TAdoDBQuery.IsNull
010c6438 heidisql.exe Main           10179  +15 TMainForm.AnyGridPaintText
009b093b heidisql.exe VirtualTrees   25195   +2 TCustomVirtualStringTree.DoPaintText
009afdea heidisql.exe VirtualTrees   24970   +5 TCustomVirtualStringTree.CalculateTextWidth
009b0438 heidisql.exe VirtualTrees   25098  +27 TCustomVirtualStringTree.DoGetNodeWidth
009a0954 heidisql.exe VirtualTrees   18753  +85 TBaseVirtualTree.GetDisplayRect
010c9059 heidisql.exe Main           10722  +28 TMainForm.AutoCalcColWidth
010aea6f heidisql.exe Main            6013 +169 TMainForm.DataGridBeforePaint
0098cf5d heidisql.exe VirtualTrees   11079   +2 TBaseVirtualTree.DoBeforePaint
009a723b heidisql.exe VirtualTrees   22071   +5 TBaseVirtualTree.PaintTree
00998107 heidisql.exe VirtualTrees   15496  +23 TBaseVirtualTree.Paint
006c4796 heidisql.exe Vcl.Controls              TCustomControl.PaintWindow
006bafe3 heidisql.exe Vcl.Controls              TWinControl.PaintHandler
006bbd3f heidisql.exe Vcl.Controls              TWinControl.WMPaint
006c4728 heidisql.exe Vcl.Controls              TCustomControl.WMPaint
00988c9d heidisql.exe VirtualTrees    9217   +8 TBaseVirtualTree.WMPaint
0040f2a2 heidisql.exe System                    TObject.Dispatch
006b38fd heidisql.exe Vcl.Controls              TControl.WndProc
006bad6b heidisql.exe Vcl.Controls              TWinControl.WndProc
0099d023 heidisql.exe VirtualTrees   17344  +32 TBaseVirtualTree.WndProc
006b9f0a heidisql.exe Vcl.Controls              TWinControl.MainWndProc
005d2cb3 heidisql.exe System.Classes            StdWndProc
7ff934fb ntdll.dll                              KiUserCallbackDispatcher
7ff933c1 USER32.dll                             DispatchMessageW
0084d66e heidisql.exe Vcl.Forms                 TApplication.ProcessMessage
0084d6e3 heidisql.exe Vcl.Forms                 TApplication.HandleMessage
0084db3a heidisql.exe Vcl.Forms                 TApplication.Run
010e8258 heidisql.exe heidisql         113  +42 initialization
7ff9336a KERNEL32.DLL                           BaseThreadInitThunk
7ff934f6 ntdll.dll                              RtlUserThreadStart
ansgar's profile image ansgar posted 2 months ago Permalink

Can I reproduce it without Docker, probably by creating a temporary table myself?

matsg's profile image matsg posted 2 months ago Permalink

I just tried reproducing it myself to isolate a good test case, and now I can't reproduce it. I'll have to narrow it down and see what's going on.

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.