Article View: borland.public.cppbuilder.database.ado
Article #68Re: Crate a MS Access database at runtime
From: Viatcheslav Valerievitch Vassili...
Date: Sat, 08 Dec 2007 12:29
Date: Sat, 08 Dec 2007 12:29
49 lines
2456 bytes
2456 bytes
Import ADOX type library and execute
Adox_tlb::TCOM_Catalog cat = CoCatalog::Create();
cat->Create(strConn.c_bstr());
or
CatalogPtr cat = CoCatalog::Create();
cat->Create(strConn);
You may also need to add if you use C++ Builder 6
#include <comobj.hpp>
namespace System
{
void __fastcall CheckSafecallResult(HRESULT hr)
{
OleCheck(hr);
}
}
All strings should be declared as WideString, not as AnsiString.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Mike" <ptyven@hotmail.com> �������/�������� � �������� ���������:
news:47598d82$1@newsgroups.borland.com...
> How do I create a new MS Access database at runtime?
>
> Later on it is my plan to fill the database with data by the means of the
> ADO interface. However I am not sure if it is possible to create a MS
> database from scratch with ADO...
>
> Any suggestions?
>
> Other posibilities?
>
> thanks in advance
> Mike
>
Technical Details
Message-ID:
<475a8e59$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<47598d82$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,2cb0116f91136979 X-Google-Attributes: gid10698b,public,usenet X-Google-Language: ENGLISH,ASCII From: "Viatcheslav Valerievitch Vassiliev" <support@oledbdirect.com> Newsgroups: borland.public.cppbuilder.database.ado References: <47598d82$1@newsgroups.borland.com> In-Reply-To: <47598d82$1@newsgroups.borland.com> Subject: Re: Crate a MS Access database at runtime Date: Sat, 8 Dec 2007 15:29:18 +0300 Lines: 50 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 X-Antivirus: avast! (VPS 071207-0, 07.12.2007), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 85.93.138.132 Message-ID: <475a8e59$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1197117017 85.93.138.132 (8 Dec 2007 04:30:17 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!feeder.news-service.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail