🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #250

Re: Unknown OleVariant type

#250
From: 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 
Technical Details
Message-ID: <45d19efe$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45d18b40@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,d53137b541eef433
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Vassiliev V. V." <support@oledbdirect.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <45d18b40@newsgroups.borland.com>
Subject: Re: Unknown OleVariant type
Date: Tue, 13 Feb 2007 14:20:14 +0300
Lines: 84
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Response
X-Antivirus: avast! (VPS 000712-7, 12.02.2007), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 85.93.138.132
Message-ID: <45d19efe$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1171365630 85.93.138.132 (13 Feb 2007 03:20:30 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail