crashed when trying to display table contents from a SQL Server 2000 database
HeidiSQL crashed when I tried to display contents from a table in a SQL Server 2000 database (yeah, I know! trying to move it into the 21st century!) and so I attach the bug report.
It's here: https://dl.dropboxusercontent.com/u/6625297/bugreport.txt
(The forum webapp refused to let me attach it, saying "Error: File #0: Invalid file format: text/x-pascal. Allowed types: jpg, png, gif, txt, html.")
Thanks for all you do!
It's here: https://dl.dropboxusercontent.com/u/6625297/bugreport.txt
(The forum webapp refused to let me attach it, saying "Error: File #0: Invalid file format: text/x-pascal. Allowed types: jpg, png, gif, txt, html.")
Thanks for all you do!
The relevant message from that callstack is:
Invalid object name 'sys.partitions'
The query which is not working correctly is this one:
I can add a version conditional for older MSSQL versions like 2000. But you will have to post a working example here, as I'm not very familiar with these old servers.
Invalid object name 'sys.partitions'
The query which is not working correctly is this one:
SELECT SUM(rows) FROM sys.partitions
WHERE
index_id IN (0, 1)
AND object_id = object_id("yourdb"."yourschema"."yourtable")
I can add a version conditional for older MSSQL versions like 2000. But you will have to post a working example here, as I'm not very familiar with these old servers.
Code modification/commit
db76b2f
from ansgarbecker,
10 years ago,
revision 9.1.0.4941
Outsource RowCount into TDBObject which calls TDBConnection.GetRowCount with a server and version specific query. Introduce SELECT COUNT(*) for MSSQL 2000.
See
* http://www.heidisql.com/forum.php?t=18158
* http://www.heidisql.com/forum.php?t=15438
Here is the error:
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG='mydb' AND TABLE_NAME='mytable';
SELECT c.name AS "column", prop.value AS "comment" FROM sys.extended_properties AS prop INNER JOIN sys.all_objects o ON prop.major_id = o.object_id INNER JOIN sys.schemas s ON o.schema_id = s.schema_id INNER JOIN sys.columns AS c ON prop.major_id = c.object_id AND prop.minor_id = c.column_id WHERE prop.name='MS_Description' AND s.name='' AND o.name='mytable';
/* SQL Error (208): Invalid object name 'sys.extended_properties'
Invalid object name 'sys.columns'. */
/* SQL Error (208): Invalid object name 'sys.extended_properties'
Invalid object name 'sys.columns'. */
Please login to leave a reply, or register at first.