🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Question on using class TADOTable

#4488
From: Joe Lam
Date: Sat, 05 Jan 2002 06:42
25 lines
1771 bytes
Hi,

I am using BC++ 5.0 and developing some application with MSAccess DB,
but I faced the following error during my development:

RunTime Error:
--------------
Project Project.exe raised exception class EOleException
with message 'CoInitialize has not been called'.
Process stopped. Use Step or Run to continue.


Error occurs when running the following codes:
----------------------------------------------
MainFrm->ADOTable1->Active=true;
MainFrm->ADOTable1->Last();
MainFrm->ADOTable1->Append();
MainFrm->ADOTable1->FieldValues["ID"]=id+1;
MainFrm->ADOTable1->FieldValues["Name"]=_Name;
MainFrm->ADOTable1->Post();
MainFrm->ADOTable1->Active=false;
-----------------------------------------------
I used ADOTable to connection to a MSAccess database, it works properly
several months before, but it causes this run time error. Can anyone tell
why I got this error message?
Technical Details
Message-ID: <3c32ac06_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,2572808f8ffd607e,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-01-10 07:26:27 PST
Reply-To: "Joe Lam" <joe_kplam@hkem.com>
From: "Joe Lam" <joe_kplam@hkem.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Question on using class TADOTable
Date: Sat, 5 Jan 2002 14:42:42 +0800
Lines: 27
Organization: HKUST
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 143.89.20.58
Message-ID: <3c32ac06_2@dnews>
X-Trace: dnews 1009953798 143.89.20.58 (1 Jan 2002 22:43:18 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!dnews