Beispiel #1
0
        static public string AceStrTypeCode(this DataRowView row, string fname)
        {
            int             value = int.Parse(row[fname].ToString());
            AccessDataTypes adt   = (AccessDataTypes)value;

            // there are the few redundant types
            if (adt == AccessDataTypes.Number)
            {
                return("Double");
            }
            else if (adt == AccessDataTypes.AutoIncr)
            {
                return("Int32");
            }
            else if (adt == AccessDataTypes.Currency)
            {
                return("Decimal");
            }
            else if (adt == AccessDataTypes.DateTime)
            {
                return("DateTime");
            }
            else if (adt == AccessDataTypes.Memo)
            {
                return("String");
            }
            else if (adt == AccessDataTypes.Text)
            {
                return("String");
            }
            else if (adt == AccessDataTypes.Hyperlink)
            {
                return("String");
            }
            else if (adt == AccessDataTypes.Ole)
            {
                return("Object");
            }
            else if (adt == AccessDataTypes.YesNo)
            {
                return("Boolean");
            }
            else
            {
                return(string.Empty);
            }
        }
Beispiel #2
0
 static public TypeCode AceGetNativeTypeCode(this AccessDataTypes typeRef)
 {
     if (typeRef == AccessDataTypes.Number)
     {
         return(TypeCode.Double);
     }
     else if (typeRef == AccessDataTypes.AutoIncr)
     {
         return(TypeCode.Int32);
     }
     else if (typeRef == AccessDataTypes.Currency)
     {
         return(TypeCode.Decimal);
     }
     else if (typeRef == AccessDataTypes.DateTime)
     {
         return(TypeCode.DateTime);
     }
     else if (typeRef == AccessDataTypes.Memo)
     {
         return(TypeCode.String);
     }
     else if (typeRef == AccessDataTypes.Hyperlink)
     {
         return(TypeCode.String);
     }
     else if (typeRef == AccessDataTypes.Ole)
     {
         return(TypeCode.Object);
     }
     else if (typeRef == AccessDataTypes.Text)
     {
         return(TypeCode.String);
     }
     else if (typeRef == AccessDataTypes.YesNo)
     {
         return(TypeCode.Boolean);
     }
     else
     {
         return(TypeCode.Empty);
     }
 }
Beispiel #3
0
 static public string[] AceStringNames(this AccessDataTypes src)
 {
     return(AceTypeNames);
 }