🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #478

TClientDataSet::LoadFromFile fails ??

#478
From: Jim Melsom
Date: Wed, 15 Aug 2001 21:53
29 lines
1976 bytes
TClientDataSet::LoadFromFile

When a TClientDataSet component is constructed by a runtime BPL, the
LoadFromFile and LoadFromStream methods fail.  When the BPL is
statically linked, the methods work. The same thing happens if you
derive a new component from TClientDataSet and create an instance in
code or drop it on a form. When dropped on a form, the IDE is able to
set the Active peorpty to true, but the program cannot.

Is this a known problem?  Does anyone know the reason for it?


Example: If a BPL contains an exported function like the following 
(inside or outside a class, it doesn't make any difference):

declaration:  
TClientDataSet* _export CreateDS(TComponent* Owner);

implementation: 
TClientDataSet* CreateDS(TComponent* Owner) { return new
TClientDataSet(Owner); };

An application that dynamically links this BPL will fail if it tries to
do the following:

TClientDataSet* ds = CreateDS(this);
ds->LoadFromFile(aValidDatasetFile);

 If the BPL is statically linked, the function works.
Technical Details
Message-ID: <3B7AEF61.34AF@gemteck.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!128.230.129.106!news.maxwell.syr.edu!news.stealth.net!130.94.89.10.MISMATCH!news-out.spamkiller.net!propagator-la!news-in.superfeed.net!caladan.arrakis.es!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,5a4d73f31aebdf20,start
X-Google-Attributes: gidfcd2b,public
X-Google-ArrivalTime: 2001-08-15 15:17:03 PST
Message-ID: <3B7AEF61.34AF@gemteck.com>
Date: Wed, 15 Aug 2001 14:53:37 -0700
From: Jim Melsom <jhm@gemteck.com>
Reply-To: jhm@gemteck.com
X-Mailer: Mozilla 3.04 (WinNT; U)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.multi-tier
Subject: TClientDataSet::LoadFromFile fails ??
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 204.244.158.198
X-Trace: dnews 997912645 204.244.158.198 (15 Aug 2001 14:57:25 -0700)
Lines: 29
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!128.230.129.106!news.maxwell.syr.edu!news.stealth.net!130.94.89.10.MISMATCH!news-out.spamkiller.net!propagator-la!news-in.superfeed.net!caladan.arrakis.es!dnews