/// <summary> /// 将字符串形式的数据库类型转换为枚举类型的数据库类型 /// </summary> /// <param name="dbtypestring"></param> /// <returns></returns> public DbType PasteDBType(string dbtypestring) { DbType t; OleDbType sd = GetOleDbTypeByString(dbtypestring); t = NativeDBType.FromDataType(sd).enumDbType; return(t); }
/// <summary> /// 数据库类型转换为系统类型 /// </summary> /// <param name="dbtypestring"></param> /// <returns></returns> public Type PasteType(string dbtypestring) { Type t = null; OleDbType sd = GetOleDbTypeByString(dbtypestring); t = NativeDBType.FromDataType(sd).dataType; return(t); }
/// <summary> /// 系统类型转换为数据库类型 /// </summary> /// <param name="t"></param> /// <returns></returns> public DbType PasteType(Type t) { return(NativeDBType.FromSystemType(t).enumDbType); // return MetaType.GetMetaTypeFromType(t).DbType; }