乖 乖乖宝 Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-10 #1 数据库为sql server 2000,如何利用Tquery、Ttable获取对应数据表的字段数量、字段名称? 我试遍了query/table的各种属性,都没有成功,快晕倒了。请指教。
B Babylon5 Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-10 #2 ADODataSet.FieldDefs ADODataSet.Fields.Count; for i := 0 to ADODataSet.Fields.Count - 1 do begin s := ADODataSet.Fields[ i ].FieldName; .... end;
ADODataSet.FieldDefs ADODataSet.Fields.Count; for i := 0 to ADODataSet.Fields.Count - 1 do begin s := ADODataSet.Fields[ i ].FieldName; .... end;
S sqz Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-10 #4 利用table1.fields.count (字段数量) table1.fields.fieldname(当前字段名称)
D digeozeng Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-10 #5 字段数量:table1.fieldcount获取 字段名称:table1.fields.fieldname获取
乖 乖乖宝 Unregistered / Unconfirmed GUEST, unregistred user! 2003-03-10 #6 谢谢大家!虽然我在看到大家答案之前自己解决了,但是还是非常感谢!