🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Use of ADO Recordset

#807
From: Bas Groeneveld
Date: Fri, 06 May 2005 06:48
28 lines
1924 bytes
> In type library Item is property, and GetItem, get_Item and/or [] depends
on
> program that imports type library. [] are imported, if I am not wrong, by
> C++ Builder 6, but not earlier.

Interesting I am using C++Builder 6 but definitely don't appear to have []
available.

>
> >            wstUser =
> > adoRS->Fields->get_Item(Variant(1))->get_Value().bstrVal;
>
> try
>
> adoRS->Fields->getItem(WideString("User"))->get_Value();

wstUser = adoRS->Fields->get_Item(WideString("User"))->get_Value().bstrVal;
- generates a compiler error [C++ Error] fRxWorks.cpp(134): E2285 Could not
find a match for 'Fields15::get_Item(WideString)'

wstUser = adoRS->Fields->get_Item(Variant("User"))->get_Value().bstrVal;
- compiles but generates a runtime error reported by OLECHECK

wstUser = adoRS->Fields->get_Item(Variant(1))->get_Value().bstrVal;
- compiles and runs ok

Cheers
Bas
Technical Details
Message-ID: <427b1331@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42787b1f$1@newsgroups.borland.com> <42789e2f$1@newsgroups.borland.com> <42796494@newsgroups.borland.com> <4279b874@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,6b79b4524634c0b2
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Bas Groeneveld" <nospam@nospam.com.au>
Newsgroups: borland.public.cppbuilder.database.ado
References: <42787b1f$1@newsgroups.borland.com> <42789e2f$1@newsgroups.borland.com> <42796494@newsgroups.borland.com> <4279b874@newsgroups.borland.com>
Subject: Re: Use of ADO Recordset
Date: Fri, 6 May 2005 16:48:17 +1000
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 60.230.80.18
Message-ID: <427b1331@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115362097 60.230.80.18 (5 May 2005 23:48:17 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail