Applies To:
  • CitectSCADA 6.00

CiRecipe ActiveX control doesn’t display any data on Web Client.

My project uses CiRecipe ActiveX control to display recipes defined in a DBF file (recipes.dbf), it all works fine on the development machine.

When I run this project in web client, it doesn't show any data. Instead, I get data source connection errors. What is the cause to this problem?


CiRecipe ActiveX control displays data that is fetched from data source. The data source is configured by setting the "Database Connection String" on the "Connection" tab of the "CiRecipe.RecipeMngr Properties".

If the configured "Database Connection String" contains a path that is relative to the machine (e.g. DefaultDir=C:\PROGRAM FILES\CITECT\CITECTSCADA\USER\Example or FILEDSN=C:\Program Files\Common Files\ODBC\Data Sources\english.dsn), it is highly possible that the referenced path or file does not existing on a web client machine. Therefore, the CiRecipe ActiveX control could not display any data on Webclient.

You must use one of following options to configure the CiRecipe database connection string

1. Construct dynamically during run-time instead of statically made during configuration time.

Example I:

// The CiRecipe ActiveX control pasted on page with AN 36.

// This function is configured as the "On page shown command".

// This function will set the control to use "Microsoft dBase Driver".

// This function will set the init catalog to Citect [run] path.

// This function will load the record inside "Recipes.dbf"


    OBJECT hRecipe = ObjectByName("AN36");

    STRING sDBConString1 = "Driver={Microsoft dBase Driver (*.dbf)};DriverId=277;FIL=dBase IV;"

    STRING sInitCatalog = "Initial Catalog=" + PathToStr("[run]");

    sDBConString1 = sDBConString1 + sInitCatalog;

    _ObjectSetProperty(hRecipe, "DBConString1", sDBConString1);

    STRING sRecordSource1 = "Recipes";

    _ObjectSetProperty(hRecipe, "RecordSource1", sRecordSource1);


2. Use UNC path for the data file location

Example II:

Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=\\\Example"


Provider=MSDASQL.1;Persist Security Info=False;Extended Properties="Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq=\\YourMachineName\Example"

where Example is the shared folder name for the CitectSCADA example project folder.

Option 2 should be used if you want to centralize the database accessed by the CiRecipe control.


CiRecipe Webclient