Applies To:
  • CitectSCADA 6.XX
  • CitectHMI 6.XX

Summary:
When using Citect to write or read from a database in the webclient and specifying the ODBC DSN name, it will only allow either the webclient or a Server/Display clients over the network to connect to the database, depending on how you have configured your ODBC connection.
 

Solution:
The solution here is to use a DSN-less connection string to connect to the database and using UNC path in the connection string when using SQLConnect().

E.g. A connection string to connect to a Microsoft Access database

hsql = SQLConnect("Driver={Microsoft Access Driver (*.mdb)};Dbq=\\SomeServer\MyDataBase.mdb");

Other connection strings include:

dBase
Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq= c:\somepath

Access
Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\ somepath \mydb.mdb;Uid=admin;Pwd=

Text
Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\somepath\;Extensions=asc,csv,tab,txt

Excel
Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=c:\somepath\myFile.xls;DefaultDir=c:\somepath

SQL Server
Driver={SQL Server};Server=MyServer;Database=myDatabase;Uid=myUserName;Pwd=myPassword
 

Keywords:
ODBC, web client, DSN, connection strings  

Attachments