不错呦!smile@林凯西,确保“准备文件”中的几个文件都有安装,S...您好,看了您这篇帖子觉得很有帮助。但是有个问题想请...我的修改过了怎么还被恶意注册呢 @jjjjiiii 用PJ快9年了,主要是A...PJ3啊,貌似很少有人用PJ了,现在不是WP就是z...@332347365,我当时接入时错误码没有-10...楼主,ChkValue值应为-103是什么意思呢?...大哥 你最近能看到我发的信息,请跟我联系,我有个制...
获取表中字段类型(文本)
编辑:dnawo 日期:2008-01-10
Field对象的type属性表示的是数据库字段的类型,该值是数值型的,通过它我们无法直观的知道字段的具体类型,通过下边两个函数我们可以将代表类型的数值转换为文本,以便于快速的知道字段的具体类型。
一、Access数据库
二、Sql Server2000数据库
一、Access数据库
复制内容到剪贴板
程序代码

Function TypeName(num)
Select Case num
Case 3
TypeName = "自动编号/数字"
Case 6
TypeName = "货币"
Case 7
TypeName = "日期/时间"
Case 11
TypeName = "是/否"
Case 202
TypeName = "文本"
Case 203
TypeName = "备注/超链接"
Case 205
TypeName = "OLE对象"
End Select
End Function
Select Case num
Case 3
TypeName = "自动编号/数字"
Case 6
TypeName = "货币"
Case 7
TypeName = "日期/时间"
Case 11
TypeName = "是/否"
Case 202
TypeName = "文本"
Case 203
TypeName = "备注/超链接"
Case 205
TypeName = "OLE对象"
End Select
End Function
二、Sql Server2000数据库
复制内容到剪贴板
程序代码

Function TypeName(num)
Select Case num
Case 2
TypeName = "smallint"
Case 3
TypeName = "int"
Case 4
TypeName = "real"
Case 5
TypeName = "float"
Case 6
TypeName = "money/smallmoney"
Case 11
TypeName = "bit"
Case 12
TypeName = "sql_variant"
Case 17
TypeName = "tinyint"
Case 20
TypeName = "bigint"
Case 72
TypeName = "uniqueidentifier"
Case 128
TypeName = "binary/timestamp"
Case 129
TypeName = "char"
Case 130
TypeName = "nchar"
Case 131
TypeName = "decimal/numeric"
Case 135
TypeName = "datetime/smalldatetime"
Case 200
TypeName = "varchar"
Case 201
TypeName = "text"
Case 202
TypeName = "nvarchar"
Case 203
TypeName = "ntext"
Case 204
TypeName = "varbinary"
Case 205
TypeName = "image"
End Select
End Function
Select Case num
Case 2
TypeName = "smallint"
Case 3
TypeName = "int"
Case 4
TypeName = "real"
Case 5
TypeName = "float"
Case 6
TypeName = "money/smallmoney"
Case 11
TypeName = "bit"
Case 12
TypeName = "sql_variant"
Case 17
TypeName = "tinyint"
Case 20
TypeName = "bigint"
Case 72
TypeName = "uniqueidentifier"
Case 128
TypeName = "binary/timestamp"
Case 129
TypeName = "char"
Case 130
TypeName = "nchar"
Case 131
TypeName = "decimal/numeric"
Case 135
TypeName = "datetime/smalldatetime"
Case 200
TypeName = "varchar"
Case 201
TypeName = "text"
Case 202
TypeName = "nvarchar"
Case 203
TypeName = "ntext"
Case 204
TypeName = "varbinary"
Case 205
TypeName = "image"
End Select
End Function






评论: 0 | 引用: 0 | 查看次数: 3723
发表评论
请登录后再发表评论!