Applies To:
  • CitectSCADA

I am using an sql select statement which joins two or more tables.
In the select, we have 4 fields selected. But viewing this in the
Database Exchange Control, there are more than 4 fields returned.

SELECT  dbo.sites.site_name
FROM   dbo.sites
INNER JOIN dbo.facility ON dbo.facility.site_id = dbo.sites.site_id
Where dbo.facility.factype like 'Production'

By default, the Database Exchange Control uses
Microsoft OLE DB Provider for ODBC Drivers
in the connection.

In Properties -> Connection -> Database Connection String click Build
then in the Data Link Properties:
-in Provider and select Microsoft OLE DB Provider for SQL Server
-in Connection, enter the server name eg localhost\SQLEXPRESS.
-use Windows Integrated Security to avoid password problems.
-Select the database on the server, and click Test Connection.

This method does not use a DNS, and will make deployment to other computers easier.