🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
ODBC support
This page was created by Wikiadmin on 2026-07-29. Last edited by Wikiadmin on 2026-07-29.

You can use ODBC with SQLExport when you need MDrivenServer to write model data to another external SQL database.

Use ODBC with SQLExport

SQLExport is a server-side action that writes data from your model to an external SQL database. It can use an ODBC connection instead of the regular connection string.

To select ODBC, provide connectionstringodbc. SQLExport then uses the ODBC connection.

Configure the SQLExport data

  1. Create the SQLExport root data with connectionstringodbc.
  2. Add a nesting whose column name starts with data. Column-name matching is case-insensitive.
  3. Collect the row or rows to write in that data nesting.
  4. On each data row, provide queryforinsert, queryforupdate, and queryforselectcount.
  5. Run the action from MDrivenServer.

SQLExport evaluates queryforselectcount first. When it returns 0, SQLExport uses queryforinsert; otherwise, it uses queryforupdate.

For example, use connectionstringodbc when a scheduled SQLExport action replicates model-driven data to an external database through an ODBC connection. The data nesting must still be collected when it contains one object; use self->asset for that case.

Command timeout

You can add a CommandTimeout column with an integer value in seconds. The default timeout is 30 seconds.

Scope of this ODBC guidance

This guidance covers ODBC as the connection mechanism used by SQLExport to write data to an external SQL database. It does not document an ODBC endpoint for BI tools to query MDriven model data directly.

See also