if you are using SQL Server, tryselect c.* from syscolumns c, sysobjects t where c.id = t.id and t.type='U' and t.name='YourTableName'
解决方案 »
- 为什么不能这么用Include(Label1.Font.Style,fsBold)?
- DBChart和DBCombox的问题
- 关于DELPHI中的那个代码提示窗口
- 有问题指教
- 如何在delphi中动态的建立一*.dat文件呢。并且同时可以写入指定内容?
- 怎样在DELPHI用汇编指令IN/OUT?
- 谁能告诉我,窗口在最大化时,发了什么消息???(在线等待.......)
- 如何用循环语句实现下面的功能!
- php中计算时间差
- 怎样设计一个完整的数据库程序。
- 请教如何使用TWebConnection。如何通过它的AppServer属性调用应用服务组件的方法。
- 怎样修改下面的程序,使之能在窗口移动时也让form达到透明效果?
var icount:integer;
begin
//先要open select * from 表名
for icount:=0 to AdoDataSet1.Fields.count-1 do
listbox1.items.add(AdoDataset1.fields[icount].Fieldname);
end;
dm1.CDSTmp.Close;
dm1.CDSTmp.FieldDefs.Clear;
for i := 0 to dm1.QryMain.FieldCount - 1 do
begin
with dm1.CDSTmp.Fielddefs.AddFieldDef do
begin
name := dm1.QryMain.Fields[i].FieldName;
datatype := dm1.QryMain.Fields[i].DataType;
required := dm1.QryMain.Fields[i].required;
end;
end;
dm1.CDSTmp.CreateDataSet;
Retrieves a list of names for all fields in a fields object.procedure GetFieldNames(List: TStrings);DescriptionCall GetFieldNames to get a list of names for all fields in a fields object. List is a TStrings (or compatible) object created and maintained by the application.Retrieving a list of field names is especially useful for applications that work with datasets whose field objects are created dynamically at runtime. By retrieving a list of field names, the application can be restricted to working only with fields that exist at runtime.Retrieves a specified set of field objects into a list.procedure GetFieldList(List: TList; const FieldNames: string);DescriptionCall GetFieldList to copy a specified set of field objects into a list object created and maintained by the application.List is the TList object into which to copy the field objects. FieldNames is a string containing the name of the fields to copy. Each field name in the string must be separated from other field names with a semicolon. GetFieldList builds a list that contains only the field objects for which it finds a matching name in the dataset抯 list of field objects.Note: Applications do not normally call GetFieldList to copy field objects. Field objects are directly accessible through the dataset itself. In some cases, however, it can be useful to work with a copy of a field object or its data instead of working on the actual object in the dataset.