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.

MS SQL: sp_helptext failure causes crash in HeidiSQL

igitur's profile image igitur posted 3 years ago in General Permalink

Sometimes I don't have access to all the objects in a database. In such cases I often experience HeidiSQL exceptions / crashes.

e.g. there is an object myschema.del_SomeProc in the one database. I don't have rights to this stored proc. When I'm writing a query and the autocomplete tries to retrieve info about the objects int he database, this is executed and it causes a crash:

EXEC sp_helptext 'myschema.del_SomeProc';
/* SQL Error (15197): There is no text for object 'myschema.del_SomeProc'. */

My suggestion is to consume and hide errors that are returned from sp_helptext.

Bug report:

date/time          : 2016-07-27, 15:42:43, 563ms
computer name      : DST00344
user name          : FrancoisBo <admin>
registered owner   : SI / Sanlam Investments
operating system   : Windows 7 x64 Service Pack 1 build 7601
system language    : English
system up time     : 23 hours 7 minutes
program up time    : 4 minutes 53 seconds
processors         : 8x Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
physical memory    : 10011/16308 MB (free/total)
free disk space    : (C:) 247.24 GB (D:) 768.65 GB
display mode       : 1920x1080, 32 bit
process id         : $4154
allocated memory   : 102.11 MB
largest free block : 8181.50 GB
executable         : heidisql.exe
exec. date/time    : 2016-07-27 15:37
version            : 9.3.0.5107
compiled with      : Delphi XE5
madExcept version  : 4.0.12
callstack crc      : $2ef15873, $c6d7722e, $c6d7722e
exception number   : 1
exception class    : Unknown
exception message  : Unknown.

main thread ($3414):
00a86aca heidisql.exe dbconnection   2459 +47 TAdoDBConnection.Query
76ca9ed9 USER32.dll                           GetMessageW
004ede75 heidisql.exe madExcept               HandleException
004faa24 heidisql.exe madExcept               InterceptAHandleExcept
0069b3ee heidisql.exe Vcl.Controls            TWinControl.MainWndProc
005dbd03 heidisql.exe System.Classes          StdWndProc
76ca9935 USER32.dll                           DispatchMessageW
008145df heidisql.exe Vcl.Forms               TApplication.ProcessMessage
00814653 heidisql.exe Vcl.Forms               TApplication.HandleMessage
00814b3f heidisql.exe Vcl.Forms               TApplication.Run
00c76207 heidisql.exe heidisql         79 +24 initialization
76da59bb kernel32.dll                         BaseThreadInitThunk
igitur's profile image igitur posted 3 years ago Permalink

This should be a simple fix?

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