ebakker / aseisql

Automatically exported from code.google.com/p/aseisql
0 stars 1 forks source link

Opening some stored procedures -- it shows scrambled #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For some reason, when opening certain stored procedures (right click -->
open procedure ... or ctrl-click) the text of the stored procedure looks
scrambled.

I know from Dmitry that the open procedure uses a "select from syscomments
where id=object_id('procedure_name')", then AseIsql formats the text.

In the cases where my stored procedures look scrambled we noticed that they
should be ordered by the column "colid" ascending ... but this not always
happen.

Can you add " order by colid" in the select statement executed when opening
a stored procedure?  (my theory is that this can affect ramdomly anything
that is stored in syscomments)

Original issue reported on code.google.com by juliocro...@gmail.com on 6 Nov 2009 at 4:27

GoogleCodeExporter commented 9 years ago
accepted

Original comment by daggett....@gmail.com on 6 Nov 2009 at 10:42

GoogleCodeExporter commented 9 years ago
Fixed in revision #196
added "order by " for select from syscomments
now sql for selecting object text looks like:

SELECT text,char_length(text) 
FROM syscomments 
WHERE id=object_id( :name ) 
order by colid2, colid

Original comment by daggett....@gmail.com on 9 Nov 2009 at 12:47