fn_listextendedproperty

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Javan_Soft
Posts: 15
Joined: Wed 15 Jun 2005 09:43

fn_listextendedproperty

Post by Javan_Soft » Wed 12 May 2010 11:32

Hi
I write this

QAskTemp.SQL.Text:='SELECT objname, CONVERT(Varchar(100), [value]) AS [OutPut] FROM ::fn_listextendedproperty(NULL, ''user'', '''', ''table'', '+QuotedStr(SecTable.Items[Index])+', ''Column'', NULL) A WHERE (name = ''MS_Description'')';

and the SDAC (in unit OLEDBAccess)says
TableName cannot be empty

I Change it to

QAskTemp.SQL.Text:='SELECT objname, CONVERT(Varchar(100), [value]) AS [OutPut] FROM [::fn_listextendedproperty](NULL, ''user'', '''', ''table'', '+QuotedStr(SecTable.Items[Index])+', ''Column'', NULL) A WHERE (name = ''MS_Description'')';

and the SDAC Says

raised exception class EMSError with message 'Invalid object name '::fn_listextendedproperty'.'. Process stopped. Use Step or Run to continue.

What can i do?

Javan_Soft
Posts: 15
Joined: Wed 15 Jun 2005 09:43

Post by Javan_Soft » Wed 12 May 2010 12:11

i got it

i have to use Metadata

object MSMetadata1: TMSMetadata
ObjectType = otColumns
DatabaseName = 'ATest'
TableName = 'Table_1'
StoredProcName = 'TablesProperty'
Active = True
Connection = MSConnection1
end

:)

Javan_Soft
Posts: 15
Joined: Wed 15 Jun 2005 09:43

Post by Javan_Soft » Wed 12 May 2010 12:23

Wont Work

I have to find a way to find MS_Description in both 2000 and 2005
the fn_listextendedproperty can do it but i cant solve it with SDAC :shock:

Javan_Soft
Posts: 15
Joined: Wed 15 Jun 2005 09:43

Post by Javan_Soft » Wed 12 May 2010 13:03

I solve it with a fast (not good) way

Procedure TMakeJRBMainForm.CreateMsDescView(ViewName : String);
Begin
If Tools.IsViewExist('MsDesc') Then
Tools.ExecSql('Drop View MsDesc');
Tools.ExecSql('CREATE VIEW dbo.MsDesc AS SELECT objname, CONVERT(char, [value]) AS [OutPut] FROM ::fn_listextendedproperty'+
'(NULL, ''user'', ''dbo'', ''table'', '+QuotedStr(ViewName)+', ''Column'', NULL) A WHERE (name = ''MS_Description'')');

End;

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 12 May 2010 13:16

I could not reproduce the problem. Please specify exact version your IDE and the exact version of SDAC.

Javan_Soft
Posts: 15
Joined: Wed 15 Jun 2005 09:43

Post by Javan_Soft » Wed 12 May 2010 13:52

Delphi 7

Image

Javan_Soft
Posts: 15
Joined: Wed 15 Jun 2005 09:43

Post by Javan_Soft » Wed 12 May 2010 13:56

Should i change my IDE or SDAC?

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 12 May 2010 14:40

We have fixed this problem in the latest SDAC build (4.80.0.57). Please, upgrade to this build to solve the problem.

Javan_Soft
Posts: 15
Joined: Wed 15 Jun 2005 09:43

Post by Javan_Soft » Wed 12 May 2010 15:31

Ok
Tanx

Post Reply