Article View: borland.public.cppbuilder.database.ado
Article #2616Re: Lionker error when using _Collection.Count property
From: Mike Ruskai
Date: Fri, 25 Apr 2003 04:27
Date: Fri, 25 Apr 2003 04:27
38 lines
2898 bytes
2898 bytes
On Wed, 23 Apr 2003 18:29:41 -0400, Edward Diener wrote:
[snip]
>> void __fastcall CheckSafecallResult(HRESULT hr)
>> {
>> OleCheck(hr);
>
>I tried fooling around by duplicating here and changing slightly the code in
>the VCL's CheckSafecallResult call in syssupp.cpp to see if I could actually
>get it to link correctly with the actual CheckAutoResult function, which
>must be specified in some BPL, but to no avail. Using OleCheck(hr) works as
>far as linking occurs but I wonder if it is actually as good as
>CheckAutoResult if an error actually does result and hr is set to an error
>code. Does anybody know about this ? It would really be nice if Borland
>could fix this so that whatever wondrous thing is encoded in CheckAutoResult
>really happens in that case.
You're misunderstanding the nature of the problem. There is no
CheckAutoResult anywhere in Borland's libraries. Whatever its use during BCB
development, it was not included in the final product, but was erroneously
referred to in that bit of code.
The solution is to replace CheckSafecallResult, so that it calls a function
which actually exists.
I don't know if OleCheck does everything that CheckAutoResult presumably
would do. I haven't dug deep enough to even find where this function is
declared, much less defined. My guess is that it simply throws an exception
if there's an OLE error, which does in fact happen when such errors occur.
They're remarkably useless, in BCB, for finding the cause of the error, but
it does allow one to avoid shipping code that doesn't work.
--
- Mike
Remove 'spambegone.net' and reverse to send e-mail.
Technical Details
Message-ID:
<gunaalqrneguyvaxarg.hdvtpe0.pminews@207.105.83.65>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3ea586d5$1@newsgroups.borland.com> <gunaalqrneguyvaxarg.hdru980.pminews@207.105.83.65> <3ea71325$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,46b82a3e4cd2c8eb X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2003-04-24 21:38:50 PST Newsgroups: borland.public.cppbuilder.database.ado From: "Mike Ruskai" <spamten.knilhtrae@begonedynnaht.net> Message-ID: <gunaalqrneguyvaxarg.hdvtpe0.pminews@207.105.83.65> References: <3ea586d5$1@newsgroups.borland.com> <gunaalqrneguyvaxarg.hdru980.pminews@207.105.83.65> <3ea71325$1@newsgroups.borland.com> Date: Fri, 25 Apr 2003 00:27:14 -0400 (EDT) Reply-To: "Mike Ruskai" <spamten.knilhtrae@begonedynnaht.net> X-Newsreader: PMINews 2.00.1205 For OS/2 Organization: TLF MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: Lionker error when using _Collection.Count property NNTP-Posting-Host: 65.40.238.18 X-Trace: newsgroups.borland.com 1051244831 65.40.238.18 (24 Apr 2003 21:27:11 -0700) Lines: 40 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail