EasyCatalog Wiki
NousmedisContact us
English
English
  • 👋Welcome!
  • First steps
    • What is EasyCatalog?
    • 30 days trial version
    • Purchasing and activating EasyCatalog
    • Transferring an activation
    • Opening EasyCatalog documents on other computers
  • Importing your data
    • Supported data sources
    • Data concepts
    • Delimited files
    • Excel Spreadsheets
    • Google Docs Spreadsheets
    • Data from an ODBC-compliant Database
      • Connecting to the database
      • Updating the database
    • XML
    • Enterprise data providers
      • Managing Enterprise Data Providers
      • Akeneo
      • Sales Layer
      • Plytix
    • Custom data providers
    • Common errors and warnings
    • Data caching and the workspace folder
  • Field options
    • Opening the field options dialog
    • Available field options
      • The format pane
        • Alfanumeric
        • Number
        • Percentage
        • Currency
        • Custom
        • Hyperlink
        • Imported text
        • Date/Time
        • Barcode
        • Formatting rule
        • Tabular
Powered by GitBook
On this page
  • Field options dialog
  • Update using statement
  • The Use of Quotes within the statement
  • Updating the database

Was this helpful?

  1. Importing your data
  2. Data from an ODBC-compliant Database

Updating the database

Because EasyCatalog understands when the content of individual fields needs to be updated, the ODBC Data Provider supports updating of the database at a field level.

PreviousConnecting to the databaseNextXML

Last updated 2 years ago

Was this helpful?

Each field has an associated SQL statement which is used to update new content to the database. This functionality is optional, and is configured using EasyCatalog’s field Options dialog.

Field options dialog

SQL statements must be configured for each field that will be updated on the database. Keywords can be included in the statement which are replaced with field content, key field value, etc.

Only fields with the Update Using statement check-box set will be updated to the database, regardless of whether the update statement has been entered.

Update using statement

The ODBC Data Provider substitutes keywords contained in the statement immediately prior to execution to construct an SQL statement. These keywords are:

Keyword
Value

{{VALUE}}

Replaced with the current value of the field

{{KEY}}

Replaced with the unique key for the record

{{FIELDNAME}}

The content of other fields for this record can be referenced by including the field name in upper case. e.g. {{PART_NO}}

The Use of Quotes within the statement

When building your ‘update’ statements, it is important to ensure that quotes are used to enclose alphanumeric data.

Typically, around table and column names double quotes (") should be used. Field content should be enclosed in single quotes ('):

update "Stock" set "myfield" = '{{VALUE}}' where "key" = '{{KEY}}'

In the above SQL statement, Stock, myfield and key are table and column names; VALUE and KEY are field content. The usage shown here is typical, and depends on the type of database being connected to.

Updating the database

The database will be updated with the contents of the panel, so first use the Update panel menu option to update the panel with the latest information from the document.

To update the database with the latest data, use the Update Data Source... menu option from the EasyCatalog data panel.

Only data that has changed in the panel will be updated to the database. A blue dotted outline shows the data that needs updating to the database.

Database update Field Options
A blue dotted outline shows the data that needs updating to the database.
Field content updated