ODBC Compatibility - Access

Required knowledge before using ODBC in Vectorworks:

Vectorworks 2011 introduced the ability to use an ODBC (Open Database Connectivity) interface to communicate with external databases. To use this functionality; ODBC drivers and an ODBC manager are required.

Windows:

There is an integrated ODBC manager and the ‘Microsoft ODBC Driver Pack’ is available with the OS. To use databases like FileMaker Pro, MySQL, Oracle, FoxPro, etc., additional driver packages must be installed. The ODBC manager is available in Control Panel\Administrative Tools\ and it is called ‘Data Sources (ODBC)’. Take into consideration that in 64bit Windows there are two applications – one 32bit and one 64bit. They work with different ODBC drivers. The ‘Microsoft ODBC Driver Pack’ is not available in 64bit version and by default the list of drivers is empty. So, use the 32bit version of the ODBC manager for common purposes.


The 32bit version is located at \Windows\System32\odbcad32.exe and the 64bit version is located at \Windows\System32\odbcad32.exe.


Mac OSX:

There is no integrated ODBC manager, nor drivers. Additional packages must be installed. Here is an article about ODBC drivers and managers: http://kbase.vectorworks.net/questions/858/ODBC+Driver+Information 

Before you start using Vectorworks a DSNs (Data Source Name) must be created. It is the name that applications use to request a connection to an ODBC Data Source. In other words, it is a symbolic name that represents the ODBC connection. It stores the connection details like database name, directory, database driver, UserID, password, etc. when making a connection to the ODBC.

There are various types of ODBC Data Source Types such as System DSN, User DSN, FIle DSN. The differences between is in the store location and user privileges. Some drivers may not support all types of DSN, so be careful when create one.

On Mac some keywords Establishing ODBC connection in Vectorworks consists of three steps:

1) Connect to DSN: Tools > Database > Manage Databases. On Macintosh use username ‘admin’ with no password if you don’t have one.

2) Create Record Format Database Connection: Tools > Database > Create Record Format Connection.

3) Create Object Database Connection: Tools > Database > Object Connection.


Windows - Using ODBC to connect to Access files:

For purposes of this article a sample file ‘TestAccess.accdb’ was created with a table ‘Spaces’:

odbc access win1.png

Start 32bit version of ODBC Administrator, located at \Windows\SysWOW64\odbcad32.exe. On the ‘System DSN’ tab click on ‘Add…’ and a dialog ‘Create New Data Source’ will open. Choose ‘Microsoft Access Driver (*.mdb)’ or ‘Microsoft Access Driver (*.mdb, *.accdb)’ and click ‘Finish’. A dialog will open and enter Data Source Name, e.g. ‘Access test’, select the database file, make sure that the ‘Read Only’ check box is unchecked and click OK.

odbc access win2.png

Close the ODBC Administrator with OK. Start Vectorworks and go to Tools > Database > Manage Databases. Click on Connect button and choose the DSN ‘Access test’ from the popup. Close the dialog with OK and the connection is established. Mark a column as a key and close the dialog with OK.

odbc access win3.png

Create the following record format and map its fields to the database columns:

odbc access win4.png

Close the dialog with OK and draw a rectangle. Go to data pane in the OIP and attach record Space to it. Go to Tools > Database > Object Connection and select a row from the table:

odbc access win5.png

Close the dialog with OK and execute Tools > Database > Update Vectorworks Document and look at the data pane. The record instance is updated. Use Tools > Database > Update External Database to update data in the external database.

odbc access win6.png 



 

Mac OSX - Using ODBC to connect to Access files:

Additional driver is required for usage of access files on Macintosh. For purposes of this article Actual Access ODBC Driver and ODBC Manager are used. Sample file ‘TestAccess.accdb’ was created with a table ‘Spaces’:

 odbc access mac1.png

Start ODBC Manager and on the ‘System DSN’ tab click ‘Add…’ and choose driver Actual Access. A wizard will start and during steps enter a name for the data source, e.g. ‘Access Test’, select the database file and complete wizard.

Start Vectorworks and go to Tools > Database > Manage Databases. Click on Connect button and choose the DSN ‘Access Test’ from the popup. Enter username 'admin' if you don't have one and close the dialog with OK. The connection is established. Mark a column as a key and close the dialog with OK.

odbc access mac2.png 

Create the following record format and map its fields to the database columns:

odbc access mac3.png

Close the dialog with OK and draw a rectangle. Go to data pane in the OIP and attach record Space to it. Go to Tools > Database > Object Connection and select a row from the table:

 odbc access mac4.png

Close the dialog with OK and execute Tools > Database > Update Vectorworks Document and look at the data pane. The record instance is updated.

odbc access mac5.png 


Related Articles

Attachments

No attachments were found.

Visitor Comments

Would you like to...

Print this page  Print this page

Email this page  Email this page

Post a comment  Post a comment

Remove Highlighting Remove Highlighting

Edit this Article

Quick Edit

Export to PDF



Bookmark and Share

User Opinions

100% thumbs up 0% thumbs down (2 votes)

How would you rate this answer?




Thank you for rating this answer.

Continue