ADOX with managed C++

E

EdisonCPP

I'm trying to create an Access DB programmatically
as I have before, but trying it managed now.

I first imported ADOX 2.8, then reverted back
to 2.7 when it didn't seem to work in 2.8.

ADOX::Catalog^ catalog = gcnew ADOX::Catalog();
catalog->Create(ConnectionString);

When I type
catalog->
I do not get a choice of Tables. I get lots of other
things, like Users, Views, etc. I tried typing it in
and compiling anyway, and it's undefined.

catalog->Tables->Append(Table1);

Is there some reason I can't get Tables from catalog?

Thanks,
Steven
 
E

EdisonCPP

There is no COLUMNS collection in Table either.
Though Indexes, Keys and Properties are there.
 
J

Jeffrey Tan[MSFT]

Hi Edison,

The syntax you are using is not the 2003 managed C++, but the VS2005
C++/CLI syntax.

Yes, I can reproduce out your behavior. You will get the C3293 error while
using the "Tables" property. You have to use "default" keyword to use the
"Tables" property. Like the code below:
ADOX::CatalogClass^ catalog = gcnew ADOX::CatalogClass();
catalog->Create("abc");
catalog->default->Append();

Please refer to the link below for more details of this error:
http://msdn2.microsoft.com/en-us/library/ms173629(VS.80).aspx

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top