凤兮归来

I Always Remember Love Because Of Mom Only.
<2024年12月>
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

统计

  • 随笔 - 7
  • 文章 - 2
  • 评论 - 0
  • 引用 - 0

常用链接

留言簿(3)

随笔档案

文章档案

相册

搜索

  •  

最新评论

阅读排行榜

评论排行榜

获取Table的结构

//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{

 //获取Table1 字段值、长度及类型  FlyFeng凤兮归来
 AnsiString sType[39]={ "ftUnknown", "ftString",
   "ftSmallint", "ftInteger", "ftWord", "ftBoolean",
    "ftFloat", "ftCurrency", "ftBCD","ftDate","ftTime",
    "ftDateTime","ftBytes","ftVarBytes","ftAutoInc",
    "ftBlob","ftMemo","ftGraphic","ftFmtMemo",
    "ftParadoxOle","ftDBaseOle","ftTypedBinary",
    "ftCursor","ftFixedChar","ftWideString","ftLargeint",
    "ftADT","ftArray","ftReference","ftDataSet",
    "ftOraBlob","ftOraClob","ftVariant","ftInterface",
    "ftIDispatch","ftGuid","ftTimeStamp","ftFMTBcd"};
 Table1->Active=true;
 AnsiString Info("The fields are: ");
  for(int i = 0; i < Table1->FieldCount; i++)
    Info = Info+
           Table1->Fields->Fields[i]->FieldName +
           "(长度:"+
           Table1->Fields->Fields[i]->DataSize  +
           " 类型: "+sType[Table1->Fields->Fields[i]->DataType]   +
           ")"+ ", ";
  ShowMessage(Info);
 Table1->Active=false;
}
//---------------------------------------------------------------------------

posted on 2011-11-24 10:38 凤兮归来 阅读(203) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理