Article View: borland.public.cppbuilder.database.ado
Article #4636Re: Creating an Access database from Scratch using BCB5 and ADOX?
From: Rick Golden
Date: Mon, 12 Nov 2001 19:48
Date: Mon, 12 Nov 2001 19:48
66 lines
2601 bytes
2601 bytes
try this
TCOM_Catalog cat;
TCOM_Table tbl;
cat = CoCatalog::Create();
WideString ws = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\\test.mdb";
cat.Create((BSTR)ws);
WideString sTableName = "testit";
tbl = CoTable::Create();
tbl.set_Name((BSTR)sTableName);
tbl.Columns->Append("ColTest", adInteger, 0);
cat.Tables->Append((IUnknown*)tbl);
good luck
mike goettemoeller <goettemm@hotmail.com> wrote in message
news:3bec5779$1_1@dnews...
>
> Thanks for your help...I'm now having problems creating the database...I'm
not sure which function call I'm supposed to use and with what data for
creating the database. Does anyone know of any reference or code examples?
Thanks,
> Mike
>
>
>
> "Rick Golden" <GoldenRick@hotmail.com> wrote:
> >First you must import the type library...
> >
> >Project-Import Type Library and choose ADOX....
> >
> >after that you have to find what you need in the created ADOX_TLB.h
> >
> >I have never created any new database... but i'm doing a lot of column,
keys
> >creation and deletion...
> >and it works pretty well
> >
> >Good Luck
> >bye
> >
> >mike goettemoeller <goette@ti.com> wrote in message
> >news:3bec2854$1_2@dnews...
> >>
> >> Hi,
> >> I've seen around a few of the newsgroups references to creating a
database
> >on the fly using ADOX in Delphi...my question is, how do I
> >> incorporate this into BCB5? R there any examples anywhere? Thanks in
> >advance...
> >>
> >> Mike
> >
> >
>
Technical Details
Message-ID:
<3bf02716_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3bec2854$1_2@dnews> <3bec2ed2_2@dnews> <3bec5779$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,b2a27dc625de89c1 X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-11-12 11:59:54 PST Reply-To: "Rick Golden" <GoldenRick@hotmail.com> From: "Rick Golden" <GoldenRick@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3bec2854$1_2@dnews> <3bec2ed2_2@dnews> <3bec5779$1_1@dnews> Subject: Re: Creating an Access database from Scratch using BCB5 and ADOX? Date: Mon, 12 Nov 2001 14:48:14 -0500 Lines: 68 Organization: Gold X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 NNTP-Posting-Host: 198.168.250.105 Message-ID: <3bf02716_1@dnews> X-Trace: dnews 1005594390 198.168.250.105 (12 Nov 2001 11:46:30 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!uunet!osa.uu.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews