Article View: borland.public.cppbuilder.database.ado
Article #1832Linking Tables to an MSAccess Database in Code
From: Robert Emmons
Date: Wed, 21 Jan 2004 15:17
Date: Wed, 21 Jan 2004 15:17
36 lines
2018 bytes
2018 bytes
I am back to this problem again. I would like to write some code to
refresh the links to tables in an MSAccess database. Thanks to
Viatcheslav V. Vassiliev, I have some of the code needed, but I have
not been able to get it to work yet.
This code compiles (after including ADOX_TLB.h):
Adox_tlb::TCOM_Catalog cat = CoCatalog::Create();
cat->Create(WideString("Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" + thisDb));
Adox_tlb::TCOM_Table tbl = CoTable::Create();
tbl->ParentCatalog = cat;
The following was suggested, but generates compiler errors:
tbl->Properties->Item[WideString("Jet OLEDB:Create Link")]->Value =
true;
Error: 'Item' is not a member of 'Adox_tlb::Properties'
Using "Items" and "Property" instead of "Item" generates similar
errors.
The only thing that might fit which the BCB compiler completion
suggests is:
tbl->Properties->get_Item(tagVARIANT Item, Property **ppvObject);
Unfortunately, I do not know how to supply these arguments, or even if
this is the correct approach.
I would appreciate any help or suggestions.
Technical Details
Message-ID:
<pu5t00drncdrn41hnftvesb6nviv7pjs4l@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,624e139e318cdbfb,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2004-01-21 07:37:05 PST From: Robert Emmons <remmons@aurigen.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Linking Tables to an MSAccess Database in Code Date: Wed, 21 Jan 2004 10:17:07 -0500 Message-ID: <pu5t00drncdrn41hnftvesb6nviv7pjs4l@4ax.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 68.193.14.50 X-Trace: newsgroups.borland.com 1074698110 68.193.14.50 (21 Jan 2004 07:15:10 -0700) Lines: 37 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!c03.atl99!news.webusenet.com!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail