🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
2 messages
2 total messages Started by ADC GmbH Tue, 13 Feb 2007 09:56
Unknown OleVariant type
#249
Author: ADC GmbH
Date: Tue, 13 Feb 2007 09:56
14 lines
1569 bytes
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
Re: Unknown OleVariant type
#250
Author: Vassiliev V. V.
Date: Tue, 13 Feb 2007 11:20
82 lines
3123 bytes
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@adcgmbh.de> ???????/???????? ? ???????? ?????????: 
news:45d18b40@newsgroups.borland.com...
> 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 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads