得到Access表的数据类型(RecordSet.fields(i).type)

function getType(num)
   getType=num
   select case num
     case "202" :
       getType="文本"
     case "203" :
       getType="备注"
     case "3" :
       getType="长整型"
     case "2" :
       getType="整型"
     case "17" :
       getType="字节"
     case "3" :
       getType="长整型"
     case "4" :
       getType="单精浮点"
     case "5" :
       getType="双精浮点"
     case "3" :
       getType="长整型"
     case "72" :
       getType="同步复制ID"
     case "131" :
       getType="小数"
     case "135" :
       getType="日期/时间"
     case "6" :
       getType="货币"
     case "11" :
       getType="是/否"
     case "205" :
       getType="OLE对象"
   end select
end function
for each field in rs.fields

getType(field.type) '返回类型

'name-名字  DefinedSize-大小

next

转自:http://blog.csdn.net/jyh_jack/article/details/2039609

转来的目的主要是记录type的类型

posted @ 2014-09-20 13:17  Spacecup  阅读(359)  评论(0编辑  收藏  举报