I'm developing a little program that shows me all my stored procedures and its content (text)
I'm using delphi 5 Ent.
My DB-environment is SQL Server 7 + SQL Server 2000.
OS of my servers is a mix of WinNT/2000.
I'm connecting to the DB using ADO (MDAC 2.8)
My Query looks like this :
SELECT so.ID, so.Name, so.crdate, so.refdate, sc.text
FROM sysobjects so INNER JOIN syscomments sc ON so.id = sc.id
WHERE so.xtype = 'P' -- All Stored Procedure-objects
AND so.name NOT LIKE 'dt%' -- Exclude 'system stored procs (all begin with dt....).
ORDER BY so.Name
In 'sysObjects' I can get the Name, CreationDate of a Stored Procedure.
In 'SysComments' I can find the content (text) of the Stored Procedure.
NOW MY PROBLEM :
All this works just fine, except when the content of a Stored-procedure contains a lot of text.
Then only the first xxxx (I suppose 4000 or something like that) charachters of the content is showed.
I use a TDBRichEdit ( linked to field 'SysComments.Text') to show the content of the SP.
Is there anyone who knows how I can ALWAYS get the COMPLETE content of my stored procedure, even if it contains a lot of text ?
This is very annoying because I have a lot of SP that contain pretty long code.
Thanks in advance.