 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
ADC GmbH Guest
|
Posted: Tue Feb 13, 2007 3:56 pm Post subject: Unknown OleVariant type |
|
|
Hi you all,
I'm accessing a MSSQL-Server via ADO. I read the data returned by a
SELECT-statement with the following line of code:
lOle = new OleVariant(fDM->ADOQuery->Recordset->Fields->Item[j]->Value);
fDM is an internal datamodule containing an ADOQuery and an
ADOConnection. This worked fine, until I connected to a customer
database: The varType of the lOle was 14 (0xE), which isn't defined in
System.hpp.
Does anyboby know this type? The field in the database is a counter,
this should return some kind of integer type.
Thanks in advance
Soeren |
|
| Back to top |
|
 |
Vassiliev V. V. Guest
|
Posted: Tue Feb 13, 2007 5:20 pm Post subject: Re: Unknown OleVariant type |
|
|
It is VT_DECIMAL. MS SQL Server may return this type for counters and
results of functions like count(*).
Complete list of variant types is in wtypes.h:
enum VARENUM
{ VT_EMPTY = 0,
VT_NULL = 1,
VT_I2 = 2,
VT_I4 = 3,
VT_R4 = 4,
VT_R8 = 5,
VT_CY = 6,
VT_DATE = 7,
VT_BSTR = 8,
VT_DISPATCH = 9,
VT_ERROR = 10,
VT_BOOL = 11,
VT_VARIANT = 12,
VT_UNKNOWN = 13,
VT_DECIMAL = 14,
VT_I1 = 16,
VT_UI1 = 17,
VT_UI2 = 18,
VT_UI4 = 19,
VT_I8 = 20,
VT_UI8 = 21,
VT_INT = 22,
VT_UINT = 23,
VT_VOID = 24,
VT_HRESULT = 25,
VT_PTR = 26,
VT_SAFEARRAY = 27,
VT_CARRAY = 28,
VT_USERDEFINED = 29,
VT_LPSTR = 30,
VT_LPWSTR = 31,
VT_RECORD = 36,
VT_FILETIME = 64,
VT_BLOB = 65,
VT_STREAM = 66,
VT_STORAGE = 67,
VT_STREAMED_OBJECT = 68,
VT_STORED_OBJECT = 69,
VT_BLOB_OBJECT = 70,
VT_CF = 71,
VT_CLSID = 72,
VT_VERSIONED_STREAM = 73,
VT_BSTR_BLOB = 0xfff,
VT_VECTOR = 0x1000,
VT_ARRAY = 0x2000,
VT_BYREF = 0x4000,
VT_RESERVED = 0x8000,
VT_ILLEGAL = 0xffff,
VT_ILLEGALMASKED = 0xfff,
VT_TYPEMASK = 0xfff
};
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"ADC GmbH" <ew (AT) adcgmbh (DOT) de> ???????/???????? ? ???????? ?????????:
news:45d18b40 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi you all,
I'm accessing a MSSQL-Server via ADO. I read the data returned by a
SELECT-statement with the following line of code:
lOle = new OleVariant(fDM->ADOQuery->Recordset->Fields->Item[j]->Value);
fDM is an internal datamodule containing an ADOQuery and an ADOConnection.
This worked fine, until I connected to a customer database: The varType of
the lOle was 14 (0xE), which isn't defined in System.hpp.
Does anyboby know this type? The field in the database is a counter, this
should return some kind of integer type.
Thanks in advance
Soeren |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|