How to identify Index fields in TMSTable Compact Edition
Posted: Mon 22 Feb 2010 18:39
I've test the code:
for i := 0 to TBl.FieldCount-1 do
begin
bIsKey := TBl.GetFieldDesc(TBl.Fields.FieldName).IsKey;
if bIsKey then
Showmessage('is key');
end;
But it seems that is not working in compact edition because I'm receiving false for all fields.
Any suggestions?
=================================================
>Hello,
>1. SDAC doesn't support IndexDefs, but you can use the >TMSTable.OrderFields property to build ORDER BY clause of SQL >statement.
>2. You can learn if the field is primary key using the TFieldDesc.IsKey >property. Also you can use the TMSMetadata component to obtain >metainformation about database objects from the server, including >information about primary key.
>Best regards,
>Devart Team
>www.devart.com
>Request Category: Technical
>Product: SQL Server Data Access Components
>Product Version: 4.80.054
>OS Version: Windows XP
>Platform: x32
>Details:
>Hi I'm testing your components to validate if we are going to to >change to SDAC. But I'm having dificulties related to TMSTable I don't >find the IndexDef as used on TTable and there is no way to get the >primary key index field names. Is there a way to do that?
>Thanks in advance.
for i := 0 to TBl.FieldCount-1 do
begin
bIsKey := TBl.GetFieldDesc(TBl.Fields.FieldName).IsKey;
if bIsKey then
Showmessage('is key');
end;
But it seems that is not working in compact edition because I'm receiving false for all fields.
Any suggestions?
=================================================
>Hello,
>1. SDAC doesn't support IndexDefs, but you can use the >TMSTable.OrderFields property to build ORDER BY clause of SQL >statement.
>2. You can learn if the field is primary key using the TFieldDesc.IsKey >property. Also you can use the TMSMetadata component to obtain >metainformation about database objects from the server, including >information about primary key.
>Best regards,
>Devart Team
>www.devart.com
>Request Category: Technical
>Product: SQL Server Data Access Components
>Product Version: 4.80.054
>OS Version: Windows XP
>Platform: x32
>Details:
>Hi I'm testing your components to validate if we are going to to >change to SDAC. But I'm having dificulties related to TMSTable I don't >find the IndexDef as used on TTable and there is no way to get the >primary key index field names. Is there a way to do that?
>Thanks in advance.