October 18, 2019

How to use TCLODBC in Surpac to write to a Microsoft Access database

  SURPAC TIPS | With TCL, as it is so easy to…
header
Avatar Trevor Lukaniuk

SURPAC TIPS | With TCL, as it is so easy to output data to simple text files, like a CSV, other output modes are often overlooked. In this post, we look at another simple way we can get data out of Surpac by using TCLODBC to write some data to a Microsoft Access database.

Preparation

A few things that need to be done before we begin are:

1. Find or create an Access database file. You will need to know the full directory path, as well as the filename.

2. In Access, create a new table, or choose to use an existing table in the database.

3. Create the fields and setup the Data Types you will be inserting data into.

For the simple purposes of this example I have an access database saved as: C:/00_projects/GEOVIA_blog/database1.accdb. The database has a table called Table1 with six fields (A, B, C, D, E, and F) all prepared to accept some integer values.

Stay up to date

Receive monthly updates on content you won’t want to miss

Subscribe

Register here to receive a monthly update on our newest content.