Article ID: 317881 - View products that this article applies to.
This article was previously published under Q317881
Caution ADO and ADO MD have not been fully tested in a Microsoft .NET Framework environment. They may cause intermittent issues, especially in service-based applications or in multithreaded applications. The techniques that are discussed in this article should only be used as a temporary measure during migration to ADO.NET. You should only use these techniques after you have conducted complete testing to make sure that there are no compatibility issues. Any issues that are caused by using ADO or ADO MD in this manner are unsupported. For more information, see the following article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/840667/ )You receive unexpected errors when using ADO and ADO MD in a .NET Framework application
Programmers often need to create databases programmatically. Although neither ActiveX Data Objects (ADO) nor ADO.NET provide the means to create Microsoft Access databases automatically, you can use the Microsoft Jet OLE DB Provider and Microsoft ADO Ext. 2.7 for DDL and Security (ADOX) through the COM Interop layer to create databases manually.
PitfallsTo create the new database, the Jet Provider requires the path to exist. If you try to create a database file in a directory that does not exist, you will receivean exception error. You can catch this exception by using a Try...Catch structure.
For more information about the .NET Framework and the COM Interop layer, visit the following MSDN Web site:
Exposing COM Components to the .NET Framework
Contact us for more help
Connect with Answer Desk for expert help.