🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: EVariantTypeCastError

#2238
From: Daniel
Date: Wed, 10 Sep 2003 06:37
35 lines
2263 bytes
it sounds like you have another problem.

Try and step through the code and see where the EVarriant error pops up.

My guess is that you are performing a Lookup on one of your tables and there
is no data to lookup but you are trying to assign the lookup value a
AnsiString.

if this is the case than add .VOleStr to the end of all your lookups (when
they are looking up String values.

"David J. Allen" <allen@riskresearchgroup.com> wrote in message
news:3f59f44a@newsgroups.borland.com...
> I have been successfully running a C++ program making use of ADO
connections
> to ACCESS databases.  I have just moved to a new computer running XP
> Professional, reinstalled C++ Builder, but run into problems when forms
are
> created in the execution.The problem seems to lie in the introduction of
an
> ADO Table--a simple program with an ADOConnection to the database works
with
> no problem but add the table, connect it and make it live and the
> EVariantTypeCastError with the message "Could not convert variant of type
> (Null) into type (String)" appears.
>
> Have I missed something in the installation or is there another problem?
>
> I would really appreciate any suggestions.
>
> Thanks,
>
> David Allen
>
>
Technical Details
Message-ID: <3f5ec6c1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!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
References: <3f59f44a@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,9a7b5514804f2f3a
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-09-09 23:40:40 PST
From: "Daniel" <admin@microsoft.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3f59f44a@newsgroups.borland.com>
Subject: Re: EVariantTypeCastError
Date: Wed, 10 Sep 2003 16:37:57 +1000
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 202.174.228.150
Message-ID: <3f5ec6c1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1063175873 202.174.228.150 (9 Sep 2003 23:37:53 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!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