🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: problem in creating TADODataSet at runtime in console application

#2639
From: Vladimir Afanasyev
Date: Wed, 30 Apr 2003 10:47
32 lines
2109 bytes
Hi Niyazi,

"Niyazi Unugur" <unugurn@hotmail.com> wrote:
>When i try to create TADODataSet at runtime; codeguard gives an exception :
>"Method called on illegaly casted object"
>
>here is the line that throws this exception;
>TADODataSet *DataSet = new TADODataSet(NULL);
>
>I think this is just because of the NULL parameter. Since my application is
>console application i cannot use 'this' pointer as a parameter.
>
>What can i do?

You can use Variant type as a wrapper for IDispatch 
interface to ADO. It is common way for later binding.
In all cases ADO it is later binding.
Yo can see in my downloads:

DBvADO 1.01 for Sybase Adaptive Server Anywhere
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=19557

OpenSchema (ADO) for MS Access
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=19587

ADOAccess v.1.0 for MS Access files
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=19860

In this case best adviser is MSDN site or Microsoft Platform SDK.

Vladimir.
Technical Details
Message-ID: <3eafa9ab$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!feed2.newsreader.com!newsreader.com!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ea7c4f6@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,7e544fbfcd16f418
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-04-30 03:50:40 PST
From: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua>
Subject: Re: problem in creating TADODataSet at runtime in console application
Newsgroups: borland.public.cppbuilder.database.ado
X-User-Info: 62.244.14.114 62.244.14.114    
X-Forwarded-For: 192.168.0.147
References:  <3ea7c4f6@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3eafa9ab$3@newsgroups.borland.com>
Date: 30 Apr 2003 03:47:07 -0700
X-Trace: newsgroups.borland.com 1051699627 207.105.83.65 (30 Apr 2003 03:47:07 -0700)
Lines: 33
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!feed2.newsreader.com!newsreader.com!newsfeed.media.kyoto-u.ac.jp!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail