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)
33
internal ODBC32.
SQL_C
_sqlctype; // need this to bind the value
fx\src\data\System\Data\Odbc\Odbc32.cs (70)
534
CHAR =
SQL_C
.CHAR, //SQL_CHAR
537
WCHAR =
SQL_C
.WCHAR, //SQL_WCHAR
541
NUMERIC =
SQL_C
.NUMERIC, //SQL_NUMERIC
544
REAL =
SQL_C
.REAL, //SQL_REAL
546
DOUBLE =
SQL_C
.DOUBLE, //SQL_DOUBLE
547
BIT =
SQL_C
.BIT, //SQL_BIT
550
BINARY =
SQL_C
.BINARY, //SQL_BINARY
555
TYPE_DATE =
SQL_C
.TYPE_DATE, //SQL_TYPE_DATE
556
TYPE_TIME =
SQL_C
.TYPE_TIME, //SQL_TYPE_TIME
557
TIMESTAMP =
SQL_C
.TIMESTAMP, //SQL_TIMESTAMP
558
TYPE_TIMESTAMP =
SQL_C
.TYPE_TIMESTAMP, //SQL_TYPE_TIMESTAMP
561
GUID =
SQL_C
.GUID, //SQL_GUID
776
static 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);
777
static 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);
778
static 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);
779
static 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);
780
static 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);
781
static 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);
782
static 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);
783
static 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);
785
static 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);
786
static 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);
787
static 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);
788
static 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);
789
static 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);
790
static 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);
791
static 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);
792
static 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);
793
static 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);
794
static 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);
795
static 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);
796
static 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);
797
static 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);
798
static 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);
799
static 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);
800
static 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);
801
static 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);
802
static 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);
803
static 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);
810
internal readonly ODBC32.
SQL_C
_sql_c;
811
internal readonly ODBC32.
SQL_C
_param_sql_c;
818
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) {
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (44)
472
bool isNotDbNull = QueryFieldInfo(i, ODBC32.
SQL_C
.BINARY, out dummy);
594
if (GetData(i, ODBC32.
SQL_C
.UTINYINT)) {
609
if (GetData(i, ODBC32.
SQL_C
.WCHAR)) {
624
if (GetData(i, ODBC32.
SQL_C
.SSHORT)) {
639
if(GetData(i, ODBC32.
SQL_C
.SLONG)){
661
if (GetData(i, ODBC32.
SQL_C
.WCHAR)) {
662
string value = (string)Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.WCHAR, ODBC32.SQL_NTS);
677
if(GetData(i, ODBC32.
SQL_C
.BIT)){
678
this.dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.BIT, -1);
692
if(GetData(i, ODBC32.
SQL_C
.REAL)){
708
if(GetData(i, ODBC32.
SQL_C
.TYPE_DATE)){
709
this.dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.TYPE_DATE, -1);
724
if(GetData(i, ODBC32.
SQL_C
.TYPE_TIMESTAMP)){
725
this.dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.TYPE_TIMESTAMP, -1);
747
if(GetData(i, ODBC32.
SQL_C
.WCHAR )){
750
s = (string)Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.WCHAR, ODBC32.SQL_NTS);
770
if(GetData(i, ODBC32.
SQL_C
.DOUBLE)){
786
if(GetData(i, ODBC32.
SQL_C
.GUID)){
821
if (GetData(i, ODBC32.
SQL_C
.WCHAR, buffer.Length - 2, out lengthOrIndicator)) {
861
gotData = GetData(i, ODBC32.
SQL_C
.WCHAR, buffer.Length - 2, out lengthOrIndicator);
898
if(GetData(i, ODBC32.
SQL_C
.TYPE_TIME)){
899
this.dataCache[i] = Buffer.MarshalToManaged(0, ODBC32.
SQL_C
.TYPE_TIME, -1);
1044
ODBC32.
SQL_C
sqlctype;
1048
sqlctype = isCharsBuffer ? ODBC32.
SQL_C
.WCHAR : ODBC32.
SQL_C
.BINARY;
1143
bool isDbNull = !QueryFieldInfo(i, ODBC32.
SQL_C
.WCHAR, out cbLengthOrIndicator);
1195
isNotDbNull = GetData(i, ODBC32.
SQL_C
.WCHAR, cbReadMax + 2, out cbTotal);
1202
isNotDbNull = GetData(i, ODBC32.
SQL_C
.BINARY, cbReadMax, out cbTotal);
1287
if(GetData(i, ODBC32.
SQL_C
.BINARY, cbBufferLen, out cbActual)) {
1300
bool flag = GetData(i, ODBC32.
SQL_C
.BINARY, cbBufferLen, out cbActual);
1318
while ((ODBC32.SQL_NO_TOTAL == cbActual) && GetData(i, ODBC32.
SQL_C
.BINARY, cbBufferLen, out cbActual));
1477
private bool QueryFieldInfo(int i, ODBC32.
SQL_C
sqlctype, out int cbLengthOrIndicator) {
1479
if (sqlctype == ODBC32.
SQL_C
.WCHAR) {
1486
private bool GetData(int i, ODBC32.
SQL_C
sqlctype) {
1506
private bool GetData(int i, ODBC32.
SQL_C
sqlctype, int cb, out int cbLengthOrIndicator) {
1549
if (sqlctype != ODBC32.
SQL_C
.WCHAR && sqlctype != ODBC32.
SQL_C
.BINARY) {
2069
ODBC32.
SQL_C
.WCHAR,
2111
ODBC32.
SQL_C
.WCHAR, // SQLSMALLINT TargetType
2138
ODBC32.
SQL_C
.WCHAR,
2157
ODBC32.
SQL_C
.WCHAR,
2238
ODBC32.
SQL_C
.WCHAR,
2244
ODBC32.
SQL_C
.SSHORT,
2251
ODBC32.
SQL_C
.WCHAR,
fx\src\data\System\Data\Odbc\OdbcParameter.cs (25)
57
private ODBC32.
SQL_C
_boundSqlCType;
81
private ODBC32.
SQL_C
_prepared_Sql_C_Type;
298
if ((ODBC32.
SQL_C
.NUMERIC == _bindtype._sql_c) && (0 != _internalPrecision)){
303
if (ODBC32.
SQL_C
.NUMERIC == _typemap._sql_c) {
309
Debug.Assert((ODBC32.
SQL_C
.WCHAR == _bindtype._sql_c) || (ODBC32.
SQL_C
.BINARY == _bindtype._sql_c), "not wchar or binary");
383
if ((ODBC32.
SQL_C
.NUMERIC == _bindtype._sql_c) && (0 != _internalPrecision)){
419
if (ODBC32.
SQL_C
.NUMERIC == _typemap._sql_c) {
425
Debug.Assert((ODBC32.
SQL_C
.WCHAR == _bindtype._sql_c) || (ODBC32.
SQL_C
.BINARY == _bindtype._sql_c), "not wchar or binary");
430
if (_bindtype._sql_c == ODBC32.
SQL_C
.WCHAR) {
455
else if (ODBC32.
SQL_C
.WCHAR == _bindtype._sql_c) {
555
ODBC32.
SQL_C
sql_c_type;
641
if (sql_c_type == ODBC32.
SQL_C
.WCHAR) {
642
sql_c_type = ODBC32.
SQL_C
.CHAR;
692
ODBC32.
SQL_C
sql_c_type = _prepared_Sql_C_Type;
709
if (ODBC32.
SQL_C
.NUMERIC == sql_c_type) {
783
if (ODBC32.
SQL_C
.NUMERIC == sql_c_type) {
790
retcode = hdesc.SetDescriptionField1(ordinal, ODBC32.SQL_DESC.TYPE, (IntPtr)ODBC32.
SQL_C
.NUMERIC);
847
if (_boundSqlCType== ODBC32.
SQL_C
.CHAR) {
857
Debug.Assert(ODBC32.
SQL_C
.NUMERIC == _typemap._sql_c, "unexpected");
913
internal void SetInputValue(object value, ODBC32.
SQL_C
sql_c_type, int cbsize, int sizeorprecision, int offset, CNativeBuffer parameterBuffer) { //Handle any input params
926
case ODBC32.
SQL_C
.CHAR:
927
case ODBC32.
SQL_C
.WCHAR:
928
case ODBC32.
SQL_C
.BINARY:
fx\src\data\System\Data\Odbc\OdbcStatementHandle.cs (4)
74
internal ODBC32.RetCode BindColumn2(int columnNumber, ODBC32.
SQL_C
targetType, HandleRef buffer, IntPtr length, IntPtr srLen_or_Ind) {
80
internal ODBC32.RetCode BindColumn3(int columnNumber, ODBC32.
SQL_C
targetType, IntPtr srLen_or_Ind) {
86
internal 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) {
165
internal 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)
29
internal object MarshalToManaged(int offset, ODBC32.
SQL_C
sqlctype, int cb) {
33
case ODBC32.
SQL_C
.WCHAR:
45
case ODBC32.
SQL_C
.CHAR:
46
case ODBC32.
SQL_C
.BINARY:
53
case ODBC32.
SQL_C
.SSHORT:
57
case ODBC32.
SQL_C
.SLONG:
61
case ODBC32.
SQL_C
.SBIGINT:
65
case ODBC32.
SQL_C
.BIT:
70
case ODBC32.
SQL_C
.REAL:
74
case ODBC32.
SQL_C
.DOUBLE:
78
case ODBC32.
SQL_C
.UTINYINT:
82
case ODBC32.
SQL_C
.GUID:
86
case ODBC32.
SQL_C
.TYPE_TIMESTAMP:
103
case ODBC32.
SQL_C
.TYPE_DATE:
115
case ODBC32.
SQL_C
.TYPE_TIME:
126
case ODBC32.
SQL_C
.NUMERIC:
155
internal void MarshalToNative(int offset, object value, ODBC32.
SQL_C
sqlctype, int sizeorprecision, int valueOffset) {
157
case ODBC32.
SQL_C
.WCHAR:
197
case ODBC32.
SQL_C
.BINARY:
198
case ODBC32.
SQL_C
.CHAR:
223
case ODBC32.
SQL_C
.UTINYINT:
227
case ODBC32.
SQL_C
.SSHORT: //Int16
231
case ODBC32.
SQL_C
.SLONG: //Int32
235
case ODBC32.
SQL_C
.REAL: //float
239
case ODBC32.
SQL_C
.SBIGINT: //Int64
243
case ODBC32.
SQL_C
.DOUBLE: //Double
247
case ODBC32.
SQL_C
.GUID: //Guid
251
case ODBC32.
SQL_C
.BIT:
255
case ODBC32.
SQL_C
.TYPE_TIMESTAMP:
276
case ODBC32.
SQL_C
.TYPE_DATE:
290
case ODBC32.
SQL_C
.TYPE_TIME:
303
case ODBC32.
SQL_C
.NUMERIC: