void getIndexTable()
{
QAxObject* recordSet = object->querySubObject("OpenSchema(SchemaEnum)", 12);
if (recordSet)
{
while (!recordSet->property("EOF").toBool())
{
QAxObject* adoFields = recordSet->querySubObject("Fields");
if (adoFields)
{
int count = adoFields->property("Count").toInt();
QString tableName = "";
QString indexName = "";
QStringList indexNameList;
for (int i = 0; i < count; i++)
{
QAxObject* adoField = adoFields->querySubObject("Item(int)", i);
if (adoField)
{
QString name = adoField->property("Name").toString();
QVariant value = adoField->property("Value");
if (name == "TABLE_NAME")
{
tableName = value.toString();
}
else if (name == "INDEX_NAME")
{
indexName = value.toString();
}
ADO_DELETE(adoField);
}
}
ADO_DELETE(adoFields);
}
//移动至下一条记录
recordSet->dynamicCall("MoveNext");
}
ADO_DELETE(recordSet);
}
}
QT QAxObject access获取索引
原创
©著作权归作者所有:来自51CTO博客作者春蕾夏荷的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:自定义界面安装包进度界面轮播图片
下一篇:自定义安装界面制作效果图
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章