179 references to SQL_C
System.Data.Odbc (179)
src\libraries\Common\src\Interop\Interop.Odbc.cs (4)
39
/*SQLSMALLINT*/ODBC32.
SQL_C
TargetType,
52
/*SQLSMALLINT*/ODBC32.
SQL_C
TargetType,
62
/*SQLSMALLINT*/ODBC32.
SQL_C
SQLCType,
180
/*SQLSMALLINT*/ODBC32.
SQL_C
TargetType,
System\Data\Odbc\Odbc32.cs (70)
539
CHAR =
SQL_C
.CHAR, //SQL_CHAR
542
WCHAR =
SQL_C
.WCHAR, //SQL_WCHAR
546
NUMERIC =
SQL_C
.NUMERIC, //SQL_NUMERIC
549
REAL =
SQL_C
.REAL, //SQL_REAL
551
DOUBLE =
SQL_C
.DOUBLE, //SQL_DOUBLE
552
BIT =
SQL_C
.BIT, //SQL_BIT
555
BINARY =
SQL_C
.BINARY, //SQL_BINARY
560
TYPE_DATE =
SQL_C
.TYPE_DATE, //SQL_TYPE_DATE
561
TYPE_TIME =
SQL_C
.TYPE_TIME, //SQL_TYPE_TIME
562
TIMESTAMP =
SQL_C
.TIMESTAMP, //SQL_TIMESTAMP
563
TYPE_TIMESTAMP =
SQL_C
.TYPE_TIMESTAMP, //SQL_TYPE_TIMESTAMP
566
GUID =
SQL_C
.GUID, //SQL_GUID
766
private static readonly TypeMap s_bigInt = new TypeMap(OdbcType.BigInt, DbType.Int64, typeof(long), ODBC32.SQL_TYPE.BIGINT, ODBC32.
SQL_C
.SBIGINT, ODBC32.
SQL_C
.SBIGINT, 8, 20, true);
767
private static readonly TypeMap s_binary = new TypeMap(OdbcType.Binary, DbType.Binary, typeof(byte[]), ODBC32.SQL_TYPE.BINARY, ODBC32.
SQL_C
.BINARY, ODBC32.
SQL_C
.BINARY, -1, -1, false);
768
private static readonly TypeMap s_bit = new TypeMap(OdbcType.Bit, DbType.Boolean, typeof(bool), ODBC32.SQL_TYPE.BIT, ODBC32.
SQL_C
.BIT, ODBC32.
SQL_C
.BIT, 1, 1, false);
769
internal static 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);
770
private static readonly TypeMap s_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);
771
private static readonly TypeMap s_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);
772
private static readonly TypeMap s_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);
773
private static readonly TypeMap s_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);
775
private static readonly TypeMap s_double = new TypeMap(OdbcType.Double, DbType.Double, typeof(double), ODBC32.SQL_TYPE.DOUBLE, ODBC32.
SQL_C
.DOUBLE, ODBC32.
SQL_C
.DOUBLE, 8, 15, false);
776
internal static 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);
777
private static readonly TypeMap s_int = new TypeMap(OdbcType.Int, DbType.Int32, typeof(int), ODBC32.SQL_TYPE.INTEGER, ODBC32.
SQL_C
.SLONG, ODBC32.
SQL_C
.SLONG, 4, 10, true);
778
private static readonly TypeMap s_NChar = new TypeMap(OdbcType.NChar, DbType.StringFixedLength, typeof(string), ODBC32.SQL_TYPE.WCHAR, ODBC32.
SQL_C
.WCHAR, ODBC32.
SQL_C
.WCHAR, -1, -1, false);
779
internal static 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);
780
private static readonly TypeMap s_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);
781
internal static 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);
782
private static readonly TypeMap s_real = new TypeMap(OdbcType.Real, DbType.Single, typeof(float), ODBC32.SQL_TYPE.REAL, ODBC32.
SQL_C
.REAL, ODBC32.
SQL_C
.REAL, 4, 7, false);
783
private static readonly TypeMap s_uniqueId = new TypeMap(OdbcType.UniqueIdentifier, DbType.Guid, typeof(Guid), ODBC32.SQL_TYPE.GUID, ODBC32.
SQL_C
.GUID, ODBC32.
SQL_C
.GUID, 16, 36, false);
784
private static readonly TypeMap s_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);
785
private static readonly TypeMap s_smallInt = new TypeMap(OdbcType.SmallInt, DbType.Int16, typeof(short), ODBC32.SQL_TYPE.SMALLINT, ODBC32.
SQL_C
.SSHORT, ODBC32.
SQL_C
.SSHORT, 2, 5, true);
786
internal static 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);
787
private static readonly TypeMap s_timestamp = new TypeMap(OdbcType.Timestamp, DbType.Binary, typeof(byte[]), ODBC32.SQL_TYPE.BINARY, ODBC32.
SQL_C
.BINARY, ODBC32.
SQL_C
.BINARY, -1, -1, false);
788
private static readonly TypeMap s_tinyInt = new TypeMap(OdbcType.TinyInt, DbType.Byte, typeof(byte), ODBC32.SQL_TYPE.TINYINT, ODBC32.
SQL_C
.UTINYINT, ODBC32.
SQL_C
.UTINYINT, 1, 3, true);
789
private static readonly TypeMap s_varBinary = new TypeMap(OdbcType.VarBinary, DbType.Binary, typeof(byte[]), ODBC32.SQL_TYPE.VARBINARY, ODBC32.
SQL_C
.BINARY, ODBC32.
SQL_C
.BINARY, -1, -1, false);
790
internal static 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);
791
private static readonly TypeMap s_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);
792
private static readonly TypeMap s_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);
793
private static readonly TypeMap s_XML = new TypeMap(OdbcType.Text, DbType.AnsiString, typeof(string), ODBC32.SQL_TYPE.LONGVARCHAR, ODBC32.
SQL_C
.WCHAR, ODBC32.
SQL_C
.CHAR, -1, -1, false);
800
internal readonly ODBC32.
SQL_C
_sql_c;
801
internal readonly ODBC32.
SQL_C
_param_sql_c;
808
private 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)
System\Data\Odbc\OdbcDataReader.cs (44)
533
bool isNotDbNull = QueryFieldInfo(i, ODBC32.
SQL_C
.BINARY, out _);
672
if (GetData(i, ODBC32.
SQL_C
.UTINYINT))
692
if (GetData(i, ODBC32.
SQL_C
.WCHAR))
712
if (GetData(i, ODBC32.
SQL_C
.SSHORT))
732
if (GetData(i, ODBC32.
SQL_C
.SLONG))
759
if (GetData(i, ODBC32.
SQL_C
.WCHAR))
761
string value = (string)Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.WCHAR, ODBC32.SQL_NTS);
780
if (GetData(i, ODBC32.
SQL_C
.BIT))
782
_dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.BIT, -1);
800
if (GetData(i, ODBC32.
SQL_C
.REAL))
821
if (GetData(i, ODBC32.
SQL_C
.TYPE_DATE))
823
_dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.TYPE_DATE, -1);
842
if (GetData(i, ODBC32.
SQL_C
.TYPE_TIMESTAMP))
844
_dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.TYPE_TIMESTAMP, -1);
870
if (GetData(i, ODBC32.
SQL_C
.WCHAR))
875
s = (string)Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.WCHAR, ODBC32.SQL_NTS);
900
if (GetData(i, ODBC32.
SQL_C
.DOUBLE))
921
if (GetData(i, ODBC32.
SQL_C
.GUID))
961
if (GetData(i, ODBC32.
SQL_C
.WCHAR, buffer.Length - 2, out lengthOrIndicator))
1005
gotData = GetData(i, ODBC32.
SQL_C
.WCHAR, buffer.Length - 2, out lengthOrIndicator);
1049
if (GetData(i, ODBC32.
SQL_C
.TYPE_TIME))
1051
_dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.TYPE_TIME, -1);
1211
ODBC32.
SQL_C
sqlctype;
1215
sqlctype = isCharsBuffer ? ODBC32.
SQL_C
.WCHAR : ODBC32.
SQL_C
.BINARY;
1319
bool isDbNull = !QueryFieldInfo(i, ODBC32.
SQL_C
.WCHAR, out _);
1373
isNotDbNull = GetData(i, ODBC32.
SQL_C
.WCHAR, cbReadMax + 2, out cbTotal);
1381
isNotDbNull = GetData(i, ODBC32.
SQL_C
.BINARY, cbReadMax, out cbTotal);
1469
if (GetData(i, ODBC32.
SQL_C
.BINARY, cbBufferLen, out cbActual))
1485
bool flag = GetData(i, ODBC32.
SQL_C
.BINARY, cbBufferLen, out cbActual);
1505
while ((ODBC32.SQL_NO_TOTAL == cbActual) && GetData(i, ODBC32.
SQL_C
.BINARY, cbBufferLen, out cbActual));
1686
private bool QueryFieldInfo(int i, ODBC32.
SQL_C
sqlctype, out int cbLengthOrIndicator)
1689
if (sqlctype == ODBC32.
SQL_C
.WCHAR)
1697
private bool GetData(int i, ODBC32.
SQL_C
sqlctype)
1717
private bool GetData(int i, ODBC32.
SQL_C
sqlctype, int cb, out int cbLengthOrIndicator)
1764
if (sqlctype != ODBC32.
SQL_C
.WCHAR && sqlctype != ODBC32.
SQL_C
.BINARY)
2348
ODBC32.
SQL_C
.WCHAR,
2393
ODBC32.
SQL_C
.WCHAR, // SQLSMALLINT TargetType
2424
ODBC32.
SQL_C
.WCHAR,
2443
ODBC32.
SQL_C
.WCHAR,
2529
ODBC32.
SQL_C
.WCHAR,
2535
ODBC32.
SQL_C
.SSHORT,
2542
ODBC32.
SQL_C
.WCHAR,
System\Data\Odbc\OdbcParameter.cs (25)
45
private ODBC32.
SQL_C
_boundSqlCType;
69
private ODBC32.
SQL_C
_prepared_Sql_C_Type;
320
if ((ODBC32.
SQL_C
.NUMERIC == _bindtype!._sql_c) && (0 != _internalPrecision))
327
if (ODBC32.
SQL_C
.NUMERIC == _typemap!._sql_c)
336
Debug.Assert((ODBC32.
SQL_C
.WCHAR == _bindtype._sql_c) || (ODBC32.
SQL_C
.BINARY == _bindtype._sql_c), "not wchar or binary");
420
if ((ODBC32.
SQL_C
.NUMERIC == _bindtype!._sql_c) && (0 != _internalPrecision))
466
if (ODBC32.
SQL_C
.NUMERIC == _typemap!._sql_c)
475
Debug.Assert((ODBC32.
SQL_C
.WCHAR == _bindtype._sql_c) || (ODBC32.
SQL_C
.BINARY == _bindtype._sql_c), "not wchar or binary");
482
if (_bindtype._sql_c == ODBC32.
SQL_C
.WCHAR)
513
else if (ODBC32.
SQL_C
.WCHAR == _bindtype._sql_c)
631
ODBC32.
SQL_C
sql_c_type;
734
if (sql_c_type == ODBC32.
SQL_C
.WCHAR)
736
sql_c_type = ODBC32.
SQL_C
.CHAR;
795
ODBC32.
SQL_C
sql_c_type = _prepared_Sql_C_Type;
812
if (ODBC32.
SQL_C
.NUMERIC == sql_c_type)
894
if (ODBC32.
SQL_C
.NUMERIC == sql_c_type)
902
retcode = hdesc.SetDescriptionField1(ordinal, ODBC32.SQL_DESC.TYPE, (IntPtr)ODBC32.
SQL_C
.NUMERIC);
965
if (_boundSqlCType == ODBC32.
SQL_C
.CHAR)
978
Debug.Assert(ODBC32.
SQL_C
.NUMERIC == _typemap._sql_c, "unexpected");
1048
internal void SetInputValue(object? value, ODBC32.
SQL_C
sql_c_type, int cbsize, int sizeorprecision, int offset, CNativeBuffer parameterBuffer)
1067
case ODBC32.
SQL_C
.CHAR:
1068
case ODBC32.
SQL_C
.WCHAR:
1069
case ODBC32.
SQL_C
.BINARY:
System\Data\Odbc\OdbcStatementHandle.cs (4)
60
internal ODBC32.SQLRETURN BindColumn2(int columnNumber, ODBC32.
SQL_C
targetType, HandleRef buffer, IntPtr length, IntPtr srLen_or_Ind)
67
internal ODBC32.SQLRETURN BindColumn3(int columnNumber, ODBC32.
SQL_C
targetType, IntPtr srLen_or_Ind)
74
internal ODBC32.SQLRETURN BindParameter(short ordinal, short parameterDirection, ODBC32.
SQL_C
sqlctype, ODBC32.SQL_TYPE sqltype, IntPtr cchSize, IntPtr scale, HandleRef buffer, IntPtr bufferLength, HandleRef intbuffer)
162
internal ODBC32.SQLRETURN GetData(int index, ODBC32.
SQL_C
sqlctype, CNativeBuffer buffer, int cb, out IntPtr cbActual)
System\Data\Odbc\OdbcUtils.cs (32)
25
internal object MarshalToManaged(int offset, ODBC32.
SQL_C
sqlctype, int cb)
30
case ODBC32.
SQL_C
.WCHAR:
43
case ODBC32.
SQL_C
.CHAR:
44
case ODBC32.
SQL_C
.BINARY:
51
case ODBC32.
SQL_C
.SSHORT:
55
case ODBC32.
SQL_C
.SLONG:
59
case ODBC32.
SQL_C
.SBIGINT:
63
case ODBC32.
SQL_C
.BIT:
68
case ODBC32.
SQL_C
.REAL:
72
case ODBC32.
SQL_C
.DOUBLE:
76
case ODBC32.
SQL_C
.UTINYINT:
80
case ODBC32.
SQL_C
.GUID:
84
case ODBC32.
SQL_C
.TYPE_TIMESTAMP:
101
case ODBC32.
SQL_C
.TYPE_DATE:
113
case ODBC32.
SQL_C
.TYPE_TIME:
124
case ODBC32.
SQL_C
.NUMERIC:
153
internal void MarshalToNative(int offset, object value, ODBC32.
SQL_C
sqlctype, int sizeorprecision, int valueOffset)
157
case ODBC32.
SQL_C
.WCHAR:
201
case ODBC32.
SQL_C
.BINARY:
202
case ODBC32.
SQL_C
.CHAR:
228
case ODBC32.
SQL_C
.UTINYINT:
232
case ODBC32.
SQL_C
.SSHORT: //Int16
236
case ODBC32.
SQL_C
.SLONG: //Int32
240
case ODBC32.
SQL_C
.REAL: //float
244
case ODBC32.
SQL_C
.SBIGINT: //Int64
248
case ODBC32.
SQL_C
.DOUBLE: //Double
252
case ODBC32.
SQL_C
.GUID: //Guid
256
case ODBC32.
SQL_C
.BIT:
260
case ODBC32.
SQL_C
.TYPE_TIMESTAMP:
281
case ODBC32.
SQL_C
.TYPE_DATE:
295
case ODBC32.
SQL_C
.TYPE_TIME:
308
case ODBC32.
SQL_C
.NUMERIC: