fn_listextendedproperty
-
- Posts: 15
- Joined: Wed 15 Jun 2005 09:43
fn_listextendedproperty
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?
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?
-
- Posts: 15
- Joined: Wed 15 Jun 2005 09:43
-
- Posts: 15
- Joined: Wed 15 Jun 2005 09:43
-
- Posts: 15
- Joined: Wed 15 Jun 2005 09:43
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;
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;