sqlserver与c#中数据类型的对应关系
来源:互联网 发布:淘宝卖家应用 编辑:程序博客网 时间:2024/05/18 03:38
sqlserver与c#中数据类型的对应关系
///
/// 数据库中与c#中的数据类型对照
///
/// private string changetocsharptype(string type)
{
string reval=string.empty;
switch(type.tolower())
{
case "int":
reval= "int32";
break;
case "text":
reval= "string";
break;
case "bigint":
reval= "int64";
break;
case "binary":
reval= "system.byte[]";
break;
case "bit": // 0为false
reval= "boolean";
break;
case "char":
reval= "string";
break;
case "datetime":
reval= "system.datetime";
break;
case "decimal":
reval= "system.decimal";
break;
case "float":
reval= "system.double";
break;
case "image":
reval= "system.byte[]";
break;
case "money":
reval= "system.decimal";
break;
case "nchar":
reval= "string";
break;
case "ntext":
reval= "string";
break;
case "numeric":
reval= "system.decimal";
break;
case "nvarchar":
reval= "string";
break;
case "real":
reval= "system.single";
break;
case "smalldatetime":
reval= "system.datetime";
break;
case "smallint":
reval= "int16";
break;
case "smallmoney":
reval= "system.decimal";
break;
case "timestamp":
reval= "system.datetime";
break;
case "tinyint":
reval= "system.byte";
break;
case "uniqueidentifier":
reval= "system.guid";
break;
case "varbinary":
reval= "system.byte[]";
break;
case "varchar":
reval= "string";
break;
case "variant":
reval="object";
break;
default:
reval= "string";
break;
}
return reval;
}
/// 数据库中与c#中的数据类型对照
///
/// private string changetocsharptype(string type)
{
string reval=string.empty;
switch(type.tolower())
{
case "int":
reval= "int32";
break;
case "text":
reval= "string";
break;
case "bigint":
reval= "int64";
break;
case "binary":
reval= "system.byte[]";
break;
case "bit": // 0为false
reval= "boolean";
break;
case "char":
reval= "string";
break;
case "datetime":
reval= "system.datetime";
break;
case "decimal":
reval= "system.decimal";
break;
case "float":
reval= "system.double";
break;
case "image":
reval= "system.byte[]";
break;
case "money":
reval= "system.decimal";
break;
case "nchar":
reval= "string";
break;
case "ntext":
reval= "string";
break;
case "numeric":
reval= "system.decimal";
break;
case "nvarchar":
reval= "string";
break;
case "real":
reval= "system.single";
break;
case "smalldatetime":
reval= "system.datetime";
break;
case "smallint":
reval= "int16";
break;
case "smallmoney":
reval= "system.decimal";
break;
case "timestamp":
reval= "system.datetime";
break;
case "tinyint":
reval= "system.byte";
break;
case "uniqueidentifier":
reval= "system.guid";
break;
case "varbinary":
reval= "system.byte[]";
break;
case "varchar":
reval= "string";
break;
case "variant":
reval="object";
break;
default:
reval= "string";
break;
}
return reval;
}
- sqlserver与c#中数据类型的对应关系
- sqlserver与c#中数据类型的对应关系
- sqlserver与c#中数据类型的对应关系
- sqlserver与c#中数据类型的对应关系
- SqlServer与C#中数据类型的对应关系
- SqlServer与C#中数据类型的对应关系
- SQLSERVER与C#中数据类型的对应关系
- SQL SERVER数据类型与C#中数据类型的对应关系
- SQL SERVER与C#中数据类型的对应关系
- SQL SERVER与C#中数据类型的对应关系
- SQL SERVER与C#中数据类型的对应关系
- SQL SERVER与C#中数据类型的对应关系
- SQL SERVER与C#中数据类型的对应关系
- sql server 与C# 中数据类型的对应关系表
- sql server 与C# 中数据类型的对应关系表
- SQL SERVER与C#中数据类型的对应关系
- SQL SERVER与C#中数据类型的对应关系
- 数据库SQL Server与C#中数据类型的对应关系
- HttpHandler,HttpModule,IHttpHandlerFactory[二]
- log4j使用手册
- 常用dos命令
- VC2005中MFC程序的部署问题
- Bugzilla迁移导致无法新增项目版本号 product version
- sqlserver与c#中数据类型的对应关系
- 3.9 t
- 关于UrlRewite之后postback地址被还原的问题的解决方法
- C#存储过程调用通用类(改进)
- 漫谈.Net中的自动垃圾收集(GarbageCollection)机制
- 有效编程的75条军规
- Core j2EE Pattern, BO, TO, VO,
- IoC理论控制反转
- 图片和传真查看器 打开图片 速度慢