Example #1
0
 internal static extern OdbcReturn SQLBindCol(
     IntPtr StmtHandle,
     short column,
     SQL_C_TYPE targetType,
     ref short value,
     int bufferLength,
     ref int indicator);
Example #2
0
 internal static extern OdbcReturn SQLGetData(
     IntPtr StatementHandle,
     ushort ColumnNumber,
     SQL_C_TYPE TargetType,
     byte[] TargetPtr,
     int BufferLen,
     ref int Len);
Example #3
0
 public OdbcTypeMap(DbType dbType, OdbcType odbcType,
                    SQL_C_TYPE nativeType, SQL_TYPE sqlType)
 {
     DbType     = dbType;
     OdbcType   = odbcType;
     SqlType    = sqlType;
     NativeType = nativeType;
 }
Example #4
0
        internal void UpdateTypes(SQL_TYPE sqlType)
        {
            SqlType = sqlType;
            OdbcTypeMap map = OdbcTypeConverter.GetTypeMap(SqlType);

            OdbcType = map.OdbcType;
            SqlCType = map.NativeType;
        }
Example #5
0
 internal static extern OdbcReturn SQLBindParameter(
     IntPtr StatementHandle,
     ushort ParamNum,
     short InputOutputType,
     SQL_C_TYPE ValueType,
     SQL_TYPE ParamType,
     uint ColSize,
     short DecimalDigits,
     IntPtr ParamValue,
     int BufLen,
     IntPtr StrLen);
Example #6
0
		internal static extern OdbcReturn SQLBindCol (
			IntPtr StmtHandle,
			short column,
			SQL_C_TYPE targetType,
			ref short value,
			int bufferLength,
			ref int indicator);
Example #7
0
		internal static extern OdbcReturn SQLBindParameter (
			IntPtr StatementHandle,
			ushort ParamNum,
			short InputOutputType,
			SQL_C_TYPE ValueType,
			SQL_TYPE ParamType,
			uint ColSize,
			short DecimalDigits,
			IntPtr ParamValue,
			int BufLen,
			IntPtr StrLen);
Example #8
0
		internal static extern OdbcReturn SQLGetData (
			IntPtr StatementHandle,
			ushort ColumnNumber,
			SQL_C_TYPE TargetType,
			byte[] TargetPtr,
			int BufferLen,
			ref int Len);
 public TypeMap (OdbcType odbcType, SQL_C_TYPE sqlCType, SQL_TYPE sqlType)
 {
         OdbcType        = odbcType;
         SqlType         = sqlType;
         SqlCType        = sqlCType;
         BitMask         = DefaultForOdbcType 
                 | DefaultForSQLCType
                 | DefaultForSQLType
                 ;
 }
 public int IndexOf (SQL_C_TYPE sqlCType)
 {
         for (int i=0; i < List.Count; i++) {
                 TypeMap map = (TypeMap) List [i];
                 if (map.SqlCType == sqlCType
                     && (map.BitMask & TypeMap.DefaultForSQLCType) > 0 )
                         return i;
         }
         return -1;
 }
 public TypeMap this [SQL_C_TYPE sqlCType]
 {
         get {
                 foreach (TypeMap map in List){
                         if (map.SqlCType == sqlCType
                             && (map.BitMask & TypeMap.DefaultForSQLCType) > 0 )
                                 return map;
                 }
                 throw new ArgumentException (String.Format ("Type mapping for odbc type {0} is not found", 
                                                             sqlCType.ToString ()
                                                             )
                                              );
         }
         set {
                 int i = IndexOf (sqlCType);
                 if (i == -1)
                         Add (value);
                 List [i] = value;
         }
         
 }
 public TypeMap (OdbcType odbcType, SQL_C_TYPE sqlCType, SQL_TYPE sqlType, short defaultFlags)
         : this (odbcType, sqlCType, sqlType)
 {
         BitMask = defaultFlags;
 }
 internal void UpdateTypes (SQL_TYPE sqlType)
 {
         SqlType = sqlType;
         OdbcTypeConverter.TypeMap map = OdbcTypeConverter.GetTypeMap (SqlType);
         OdbcType = map.OdbcType;
         SqlCType = map.SqlCType;
 }
Example #14
0
		public OdbcTypeMap (DbType dbType, OdbcType odbcType, 
				SQL_C_TYPE nativeType, SQL_TYPE sqlType)
		{
			DbType          = dbType;
			OdbcType        = odbcType;
			SqlType         = sqlType;
			NativeType      = nativeType;
		}