public static DatabaseType GetType(FieldTypes type)
 {
     DatabaseType databastType = null;
     switch (type)
     {
         case FieldTypes.BLOB:
             databastType = new DatabaseType(SqlDbType.VarBinary, DbType.Binary);
             break;
         case FieldTypes.DATETIME:
             databastType = new DatabaseType(SqlDbType.DateTime, DbType.DateTime);
             break;
         case FieldTypes.INT:
             databastType = new DatabaseType(SqlDbType.Int, DbType.Int32);
             break;
         case FieldTypes.TEXT:
             databastType = new DatabaseType(SqlDbType.VarChar, DbType.String);
             break;
     }
     return databastType;
 }
Esempio n. 2
0
 public void AddParam(String paramName, Object paramValue,DatabaseType type)
 {
     String name = MakeParam(paramName);
     query.Append(name);
     parameters.Add(new DatabaseParameter(name, paramValue,type));
 }
 public DatabaseParameter(String paramName, Object paramValue, DatabaseType type)
 {
     this.paramName = paramName;
     this.paramValue = paramValue;
     this.paramType = type;
 }