🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Creating MS Access Database (revisited)

#1958
From: Pat
Date: Wed, 07 Jan 2004 10:03
35 lines
2163 bytes
Hi,
looking the past posts I learned how can I create a new linked-table in
an existing MS Access database, using ADO components and SQL commands.
Now I'm trying to understand how can I create a new MS Access database,
so could you please explaine better the source code you use to create an
MS Access database?
I mean:
- which are the  "#include"?
- what's the meaning of
...
CoInitializeEx(NULL, COINIT_MULTITHREADED);
...
because I don't found anything about it in the BCB6 guide.
- and what about strConnectionString?
Thanks for the answer.
Pat


Simon Elliott wrote:
> I'm creating an MS Access database with:
> 
> Variant Catalog;
> Variant Connection;
> CoInitializeEx(NULL, COINIT_MULTITHREADED);
> Catalog=Variant::CreateObject("ADOX.Catalog");
> Catalog.Exec(Function("Create") << strConnectionString);
> Connection = Catalog.Exec(PropertyGet("ActiveConnection"));
> ...
> Connection.Exec(Function("Close"));
> CoUninitialize();



-- 
remove AGR for reply
Technical Details
Message-ID: <oPQKb.236350$e6.9364334@twister2.libero.it>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail
References: <DlNlsBA9AB8$Iwut@courtlands.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,1386b963f53820e2
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2004-01-07 02:03:01 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!nntp.infostrada.it!twister2.libero.it.POSTED!not-for-mail
From: Pat <pat-rizioAGR@libero.it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: it, en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Re: Creating MS Access Database (revisited)
References: <DlNlsBA9AB8$Iwut@courtlands.demon.co.uk>
In-Reply-To: <DlNlsBA9AB8$Iwut@courtlands.demon.co.uk>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 37
Message-ID: <oPQKb.236350$e6.9364334@twister2.libero.it>
Date: Wed, 07 Jan 2004 10:03:00 GMT
NNTP-Posting-Host: 62.98.43.136
X-Complaints-To: abuse@inwind.it
X-Trace: twister2.libero.it 1073469780 62.98.43.136 (Wed, 07 Jan 2004 11:03:00 MET)
NNTP-Posting-Date: Wed, 07 Jan 2004 11:03:00 MET
Organization: [Infostrada]