180 references to SQL_C
System.Data (180)
fx\src\data\System\Data\Common\UnsafeNativeMethods.cs (4)
50/*SQLSMALLINT*/ODBC32.SQL_C TargetType, 60/*SQLSMALLINT*/ODBC32.SQL_C TargetType, 71/*SQLSMALLINT*/ODBC32.SQL_C SQLCType, 206/*SQLSMALLINT*/ODBC32.SQL_C TargetType,
fx\src\data\System\Data\Odbc\DbDataRecord.cs (1)
33internal ODBC32.SQL_C _sqlctype; // need this to bind the value
fx\src\data\System\Data\Odbc\Odbc32.cs (70)
534CHAR = SQL_C.CHAR, //SQL_CHAR 537WCHAR = SQL_C.WCHAR, //SQL_WCHAR 541NUMERIC = SQL_C.NUMERIC, //SQL_NUMERIC 544REAL = SQL_C.REAL, //SQL_REAL 546DOUBLE = SQL_C.DOUBLE, //SQL_DOUBLE 547BIT = SQL_C.BIT, //SQL_BIT 550BINARY = SQL_C.BINARY, //SQL_BINARY 555TYPE_DATE = SQL_C.TYPE_DATE, //SQL_TYPE_DATE 556TYPE_TIME = SQL_C.TYPE_TIME, //SQL_TYPE_TIME 557TIMESTAMP = SQL_C.TIMESTAMP, //SQL_TIMESTAMP 558TYPE_TIMESTAMP = SQL_C.TYPE_TIMESTAMP, //SQL_TYPE_TIMESTAMP 561GUID = SQL_C.GUID, //SQL_GUID 776static private readonly TypeMap _BigInt = new TypeMap(OdbcType.BigInt, DbType.Int64, typeof(Int64), ODBC32.SQL_TYPE.BIGINT, ODBC32.SQL_C.SBIGINT, ODBC32.SQL_C.SBIGINT, 8, 20, true); 777static private readonly TypeMap _Binary = new TypeMap(OdbcType.Binary, DbType.Binary, typeof(byte[]), ODBC32.SQL_TYPE.BINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 778static private readonly TypeMap _Bit = new TypeMap(OdbcType.Bit, DbType.Boolean, typeof(Boolean), ODBC32.SQL_TYPE.BIT, ODBC32.SQL_C.BIT, ODBC32.SQL_C.BIT, 1, 1, false); 779static internal readonly TypeMap _Char = new TypeMap(OdbcType.Char, DbType.AnsiStringFixedLength, typeof(String), ODBC32.SQL_TYPE.CHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.CHAR, -1, -1, false); 780static private readonly TypeMap _DateTime = new TypeMap(OdbcType.DateTime, DbType.DateTime, typeof(DateTime), ODBC32.SQL_TYPE.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, 16, 23, false); 781static private readonly TypeMap _Date = new TypeMap(OdbcType.Date, DbType.Date, typeof(DateTime), ODBC32.SQL_TYPE.TYPE_DATE, ODBC32.SQL_C.TYPE_DATE, ODBC32.SQL_C.TYPE_DATE, 6, 10, false); 782static private readonly TypeMap _Time = new TypeMap(OdbcType.Time, DbType.Time, typeof(TimeSpan), ODBC32.SQL_TYPE.TYPE_TIME, ODBC32.SQL_C.TYPE_TIME, ODBC32.SQL_C.TYPE_TIME, 6, 12, false); 783static private readonly TypeMap _Decimal = new TypeMap(OdbcType.Decimal, DbType.Decimal, typeof(Decimal), ODBC32.SQL_TYPE.DECIMAL, ODBC32.SQL_C.NUMERIC, ODBC32.SQL_C.NUMERIC, 19, ADP.DecimalMaxPrecision28, false); 785static private readonly TypeMap _Double = new TypeMap(OdbcType.Double, DbType.Double, typeof(Double), ODBC32.SQL_TYPE.DOUBLE, ODBC32.SQL_C.DOUBLE, ODBC32.SQL_C.DOUBLE, 8, 15, false); 786static internal readonly TypeMap _Image = new TypeMap(OdbcType.Image, DbType.Binary, typeof(Byte[]), ODBC32.SQL_TYPE.LONGVARBINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 787static private readonly TypeMap _Int = new TypeMap(OdbcType.Int, DbType.Int32, typeof(Int32), ODBC32.SQL_TYPE.INTEGER, ODBC32.SQL_C.SLONG, ODBC32.SQL_C.SLONG, 4, 10, true); 788static private readonly TypeMap _NChar = new TypeMap(OdbcType.NChar, DbType.StringFixedLength, typeof(String), ODBC32.SQL_TYPE.WCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.WCHAR, -1, -1, false); 789static internal readonly TypeMap _NText = new TypeMap(OdbcType.NText, DbType.String, typeof(String), ODBC32.SQL_TYPE.WLONGVARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.WCHAR, -1, -1, false); 790static private readonly TypeMap _Numeric = new TypeMap(OdbcType.Numeric, DbType.Decimal, typeof(Decimal), ODBC32.SQL_TYPE.NUMERIC, ODBC32.SQL_C.NUMERIC, ODBC32.SQL_C.NUMERIC, 19, ADP.DecimalMaxPrecision28, false); 791static internal readonly TypeMap _NVarChar = new TypeMap(OdbcType.NVarChar, DbType.String, typeof(String), ODBC32.SQL_TYPE.WVARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.WCHAR, -1, -1, false); 792static private readonly TypeMap _Real = new TypeMap(OdbcType.Real, DbType.Single, typeof(Single), ODBC32.SQL_TYPE.REAL, ODBC32.SQL_C.REAL, ODBC32.SQL_C.REAL, 4, 7, false); 793static private readonly TypeMap _UniqueId = new TypeMap(OdbcType.UniqueIdentifier, DbType.Guid, typeof(Guid), ODBC32.SQL_TYPE.GUID, ODBC32.SQL_C.GUID, ODBC32.SQL_C.GUID, 16, 36, false); 794static private readonly TypeMap _SmallDT = new TypeMap(OdbcType.SmallDateTime, DbType.DateTime, typeof(DateTime), ODBC32.SQL_TYPE.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, ODBC32.SQL_C.TYPE_TIMESTAMP, 16, 23, false); 795static private readonly TypeMap _SmallInt = new TypeMap(OdbcType.SmallInt, DbType.Int16, typeof(Int16), ODBC32.SQL_TYPE.SMALLINT, ODBC32.SQL_C.SSHORT, ODBC32.SQL_C.SSHORT, 2, 5, true); 796static internal readonly TypeMap _Text = new TypeMap(OdbcType.Text, DbType.AnsiString, typeof(String), ODBC32.SQL_TYPE.LONGVARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.CHAR, -1, -1, false); 797static private readonly TypeMap _Timestamp = new TypeMap(OdbcType.Timestamp, DbType.Binary, typeof(Byte[]), ODBC32.SQL_TYPE.BINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 798static private readonly TypeMap _TinyInt = new TypeMap(OdbcType.TinyInt, DbType.Byte, typeof(Byte), ODBC32.SQL_TYPE.TINYINT, ODBC32.SQL_C.UTINYINT, ODBC32.SQL_C.UTINYINT, 1, 3, true); 799static private readonly TypeMap _VarBinary = new TypeMap(OdbcType.VarBinary, DbType.Binary, typeof(Byte[]), ODBC32.SQL_TYPE.VARBINARY, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 800static internal readonly TypeMap _VarChar = new TypeMap(OdbcType.VarChar, DbType.AnsiString, typeof(String), ODBC32.SQL_TYPE.VARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.CHAR, -1, -1, false); 801static private readonly TypeMap _Variant = new TypeMap(OdbcType.Binary, DbType.Binary, typeof(object), ODBC32.SQL_TYPE.SS_VARIANT, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 802static private readonly TypeMap _UDT = new TypeMap(OdbcType.Binary, DbType.Binary, typeof(object), ODBC32.SQL_TYPE.SS_UDT, ODBC32.SQL_C.BINARY, ODBC32.SQL_C.BINARY, -1, -1, false); 803static private readonly TypeMap _XML = new TypeMap(OdbcType.Text, DbType.AnsiString, typeof(String), ODBC32.SQL_TYPE.LONGVARCHAR, ODBC32.SQL_C.WCHAR, ODBC32.SQL_C.CHAR, -1, -1, false); 810internal readonly ODBC32.SQL_C _sql_c; 811internal readonly ODBC32.SQL_C _param_sql_c; 818private TypeMap(OdbcType odbcType, DbType dbType, Type type, ODBC32.SQL_TYPE sql_type, ODBC32.SQL_C sql_c, ODBC32.SQL_C param_sql_c, int bsize, int csize, bool signType) {
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (44)
472bool isNotDbNull = QueryFieldInfo(i, ODBC32.SQL_C.BINARY, out dummy); 594if (GetData(i, ODBC32.SQL_C.UTINYINT)) { 609if (GetData(i, ODBC32.SQL_C.WCHAR)) { 624if (GetData(i, ODBC32.SQL_C.SSHORT)) { 639if(GetData(i, ODBC32.SQL_C.SLONG)){ 661if (GetData(i, ODBC32.SQL_C.WCHAR)) { 662string value = (string)Buffer.MarshalToManaged(0, ODBC32.SQL_C.WCHAR, ODBC32.SQL_NTS); 677if(GetData(i, ODBC32.SQL_C.BIT)){ 678this.dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.SQL_C.BIT, -1); 692if(GetData(i, ODBC32.SQL_C.REAL)){ 708if(GetData(i, ODBC32.SQL_C.TYPE_DATE)){ 709this.dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.SQL_C.TYPE_DATE, -1); 724if(GetData(i, ODBC32.SQL_C.TYPE_TIMESTAMP)){ 725this.dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.SQL_C.TYPE_TIMESTAMP, -1); 747if(GetData(i, ODBC32.SQL_C.WCHAR )){ 750s = (string)Buffer.MarshalToManaged(0, ODBC32.SQL_C.WCHAR, ODBC32.SQL_NTS); 770if(GetData(i, ODBC32.SQL_C.DOUBLE)){ 786if(GetData(i, ODBC32.SQL_C.GUID)){ 821if (GetData(i, ODBC32.SQL_C.WCHAR, buffer.Length - 2, out lengthOrIndicator)) { 861gotData = GetData(i, ODBC32.SQL_C.WCHAR, buffer.Length - 2, out lengthOrIndicator); 898if(GetData(i, ODBC32.SQL_C.TYPE_TIME)){ 899this.dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.SQL_C.TYPE_TIME, -1); 1044ODBC32.SQL_C sqlctype; 1048sqlctype = isCharsBuffer ? ODBC32.SQL_C.WCHAR : ODBC32.SQL_C.BINARY; 1143bool isDbNull = !QueryFieldInfo(i, ODBC32.SQL_C.WCHAR, out cbLengthOrIndicator); 1195isNotDbNull = GetData(i, ODBC32.SQL_C.WCHAR, cbReadMax + 2, out cbTotal); 1202isNotDbNull = GetData(i, ODBC32.SQL_C.BINARY, cbReadMax, out cbTotal); 1287if(GetData(i, ODBC32.SQL_C.BINARY, cbBufferLen, out cbActual)) { 1300bool flag = GetData(i, ODBC32.SQL_C.BINARY, cbBufferLen, out cbActual); 1318while ((ODBC32.SQL_NO_TOTAL == cbActual) && GetData(i, ODBC32.SQL_C.BINARY, cbBufferLen, out cbActual)); 1477private bool QueryFieldInfo(int i, ODBC32.SQL_C sqlctype, out int cbLengthOrIndicator) { 1479if (sqlctype == ODBC32.SQL_C.WCHAR) { 1486private bool GetData(int i, ODBC32.SQL_C sqlctype) { 1506private bool GetData(int i, ODBC32.SQL_C sqlctype, int cb, out int cbLengthOrIndicator) { 1549if (sqlctype != ODBC32.SQL_C.WCHAR && sqlctype != ODBC32.SQL_C.BINARY) { 2069ODBC32.SQL_C.WCHAR, 2111ODBC32.SQL_C.WCHAR, // SQLSMALLINT TargetType 2138ODBC32.SQL_C.WCHAR, 2157ODBC32.SQL_C.WCHAR, 2238ODBC32.SQL_C.WCHAR, 2244ODBC32.SQL_C.SSHORT, 2251ODBC32.SQL_C.WCHAR,
fx\src\data\System\Data\Odbc\OdbcParameter.cs (25)
57private ODBC32.SQL_C _boundSqlCType; 81private ODBC32.SQL_C _prepared_Sql_C_Type; 298if ((ODBC32.SQL_C.NUMERIC == _bindtype._sql_c) && (0 != _internalPrecision)){ 303if (ODBC32.SQL_C.NUMERIC == _typemap._sql_c) { 309Debug.Assert((ODBC32.SQL_C.WCHAR == _bindtype._sql_c) || (ODBC32.SQL_C.BINARY == _bindtype._sql_c), "not wchar or binary"); 383if ((ODBC32.SQL_C.NUMERIC == _bindtype._sql_c) && (0 != _internalPrecision)){ 419if (ODBC32.SQL_C.NUMERIC == _typemap._sql_c) { 425Debug.Assert((ODBC32.SQL_C.WCHAR == _bindtype._sql_c) || (ODBC32.SQL_C.BINARY == _bindtype._sql_c), "not wchar or binary"); 430if (_bindtype._sql_c == ODBC32.SQL_C.WCHAR) { 455else if (ODBC32.SQL_C.WCHAR == _bindtype._sql_c) { 555ODBC32.SQL_C sql_c_type; 641if (sql_c_type == ODBC32.SQL_C.WCHAR) { 642sql_c_type = ODBC32.SQL_C.CHAR; 692ODBC32.SQL_C sql_c_type = _prepared_Sql_C_Type; 709if (ODBC32.SQL_C.NUMERIC == sql_c_type) { 783if (ODBC32.SQL_C.NUMERIC == sql_c_type) { 790retcode = hdesc.SetDescriptionField1(ordinal, ODBC32.SQL_DESC.TYPE, (IntPtr)ODBC32.SQL_C.NUMERIC); 847if (_boundSqlCType== ODBC32.SQL_C.CHAR) { 857Debug.Assert(ODBC32.SQL_C.NUMERIC == _typemap._sql_c, "unexpected"); 913internal void SetInputValue(object value, ODBC32.SQL_C sql_c_type, int cbsize, int sizeorprecision, int offset, CNativeBuffer parameterBuffer) { //Handle any input params 926case ODBC32.SQL_C.CHAR: 927case ODBC32.SQL_C.WCHAR: 928case ODBC32.SQL_C.BINARY:
fx\src\data\System\Data\Odbc\OdbcStatementHandle.cs (4)
74internal ODBC32.RetCode BindColumn2(int columnNumber, ODBC32.SQL_C targetType, HandleRef buffer, IntPtr length, IntPtr srLen_or_Ind) { 80internal ODBC32.RetCode BindColumn3(int columnNumber, ODBC32.SQL_C targetType, IntPtr srLen_or_Ind) { 86internal ODBC32.RetCode BindParameter(short ordinal, short parameterDirection, ODBC32.SQL_C sqlctype, ODBC32.SQL_TYPE sqltype, IntPtr cchSize, IntPtr scale, HandleRef buffer, IntPtr bufferLength, HandleRef intbuffer) { 165internal ODBC32.RetCode GetData(int index, ODBC32.SQL_C sqlctype, CNativeBuffer buffer, int cb, out IntPtr cbActual) {
fx\src\data\System\Data\Odbc\OdbcUtils.cs (32)
29internal object MarshalToManaged(int offset, ODBC32.SQL_C sqlctype, int cb) { 33case ODBC32.SQL_C.WCHAR: 45case ODBC32.SQL_C.CHAR: 46case ODBC32.SQL_C.BINARY: 53case ODBC32.SQL_C.SSHORT: 57case ODBC32.SQL_C.SLONG: 61case ODBC32.SQL_C.SBIGINT: 65case ODBC32.SQL_C.BIT: 70case ODBC32.SQL_C.REAL: 74case ODBC32.SQL_C.DOUBLE: 78case ODBC32.SQL_C.UTINYINT: 82case ODBC32.SQL_C.GUID: 86case ODBC32.SQL_C.TYPE_TIMESTAMP: 103case ODBC32.SQL_C.TYPE_DATE: 115case ODBC32.SQL_C.TYPE_TIME: 126case ODBC32.SQL_C.NUMERIC: 155internal void MarshalToNative(int offset, object value, ODBC32.SQL_C sqlctype, int sizeorprecision, int valueOffset) { 157case ODBC32.SQL_C.WCHAR: 197case ODBC32.SQL_C.BINARY: 198case ODBC32.SQL_C.CHAR: 223case ODBC32.SQL_C.UTINYINT: 227case ODBC32.SQL_C.SSHORT: //Int16 231case ODBC32.SQL_C.SLONG: //Int32 235case ODBC32.SQL_C.REAL: //float 239case ODBC32.SQL_C.SBIGINT: //Int64 243case ODBC32.SQL_C.DOUBLE: //Double 247case ODBC32.SQL_C.GUID: //Guid 251case ODBC32.SQL_C.BIT: 255case ODBC32.SQL_C.TYPE_TIMESTAMP: 276case ODBC32.SQL_C.TYPE_DATE: 290case ODBC32.SQL_C.TYPE_TIME: 303case ODBC32.SQL_C.NUMERIC: