Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 使用metaInfoQuery的Delphi索引信息_Sql_Delphi_Metadata - Fatal编程技术网

Sql 使用metaInfoQuery的Delphi索引信息

Sql 使用metaInfoQuery的Delphi索引信息,sql,delphi,metadata,Sql,Delphi,Metadata,我有一个错误“必须指定元数据参数[table name]值”。当我尝试使用以下代码获取指定sql表中列的索引信息时,出现此错误: metaInfoQuery.ObjectName := 'my_table'; metaInfoQuery.MetaInfoKind := mkIndexFields; metaInfoQuery.Open; 但这很好: metaInfoQuery.ObjectName := 'my_table'; metaInfoQuery.MetaInfoKind := mkI

我有一个错误“必须指定元数据参数[table name]值”。当我尝试使用以下代码获取指定sql表中列的索引信息时,出现此错误:

metaInfoQuery.ObjectName := 'my_table';
metaInfoQuery.MetaInfoKind := mkIndexFields;
metaInfoQuery.Open;
但这很好:

metaInfoQuery.ObjectName := 'my_table';
metaInfoQuery.MetaInfoKind := mkIndexes;
metaInfoQuery.Open;
->返回有关索引名和其他有用索引信息的信息,但不返回它们应用于哪些列的信息


那么,我应该如何使用“mkIndexFields”转换代码,以便它可以用于“mkIndexFields”

将ObjectName设置为索引的名称,而不是表的名称。

非常感谢,伙计。-我还必须将BaseObjectName设置为表的名称,它可以工作:)metaInfoQuery.BaseObjectName:=“我的表”;metaInfoQuery.ObjectName:=“myIndex”;metaInfoQuery.MetaInfoKind:=mkIndexFields;metaInfoQuery.Open;