Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 rating:
 1 out of 5     Rate this Document

How do I Create an Access Database File?

Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Toolkits>>Enterprise Connectivity Toolset

Problem:
How can I create a new Access database file (*.mdb) with the Database Connectivity Toolkit?

Solution:
The Database Connectivity Toolkit itself does not provide a tool to create a new Access database file. However, this can be achieved using ActiveX.

Use the Automation Open function from the ActiveX palette to open a reference to "Microsoft ADO Ext. x.x for DDL and Security Version x.x", where x.x is the version number. Any version will work. Select Catalog as an object, then connect an invoke node and select the "Create" method. Right-click on the "ConnectString" input and create a constant. Enter the following text into the constant: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=[file name]. The file name should be a path to the Access database you want to create, for example C:\MyAccessDB.mdb.

Related Links:
Create an Access Database (try a second time - it will fail on the first try)

Attachments:
Example Access Database Creation.vi




Report Date: 08/21/2007
Last Updated: 08/25/2007
Document ID: 4CKK4SDQ

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit