Database Exchange > Using a dBase DBF as a Data Source > Using a Connection String

Using a Connection String

You also can use a connection string to link directly to a data source without the DSN defined in ODBC settings. For example, you could use the following connection string with Database Exchange control.

Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=C:\CITECT\V542\USER\EXAMPLE

Copy and paste the string to the Database Connection String text box on the properties form.

When used in your application, Dbq path needs to be changed to your path where all dbf files are located.

The advantage of using a connection string is that there is no need for a user to create a DSN via ODBC settings on each Citect machine when a project containing Database Exchange control is restored. However, if data files are centralised, it would be best practice to configure a DSN, in particular, security.

The disadvantage of using a connection string is that it is saved with the CitectSCADA project. If the data file location changes, you must modify your project and recompile it.