;*************************************************************************
;*** Copyright (c) 2001-2025 Alexey Kuryakin kouriakine@mail.ru        ***
;*************************************************************************
;*** This file is essential part of CRW-DAQ project. Avoid to edit it. ***
;*************************************************************************
;*** DbApi settings for CRW-DAQ.                                       ***
;*************************************************************************

[DbApi.Defaults]
EngineId            = 2                        ; 0,1,2,3=[Default,ADO,SQLDB,ZEOS]
EngineList          = ADO,SQLDB,ZEOS           ; List of supported engines
DbApiMasterKey      = DbApiMasterKey           ; Internal encryption
[]
[DbApi.Defaults.ADO]
SupportedDbTypes    = SQLite3,Firebird,MySQL,PostgreSQL
[]
[DbApi.Defaults.SQLDB]
SupportedDbTypes    = IB,MSSQL,MySQL40,MySQL41,MySQL50,MySQL51,MySQL55,MySQL56,MySQL57,MySQL80,ODBC,Oracle,PQ,SQLite3,Sybase
[]
[DbApi.Defaults.ZEOS]
SupportedDbTypes    = ado,ASA,asa_capi,firebird,interbase,mariadb,mssql,mysql,odbc_a,odbc_w,OleDb,oracle,pooled.*,postgresql,sqlite,sybase,WebServiceProxy
[]

[DbApi.OleDb.Providers]
MSDASQL             = MSDASQL                  ; System default provider
IBProvider          = LCPI.IBProvider.5.Free   ; Firebird Free provider
;==================== List of providers available
OleDb.Providers     = MSDASQL,IBProvider
[]

[DbApi.Odbc.Drivers]
SQLite3             = SQLite3 ODBC Driver
Firebird            = Firebird/InterBase(r) driver
PostgreSQL.ANSI     = PostgreSQL ANSI
PostgreSQL.Unicode  = PostgreSQL Unicode
MySQL.ANSI          = MySQL ODBC 8.0 ANSI Driver
MySQL.Unicode       = MySQL ODBC 8.0 Unicode Driver
;==================== List of ODBC drivers available
Odbc.Drivers        = SQLite3,Firebird,PostgreSQL.ANSI,PostgreSQL.Unicode,MySQL.ANSI,MySQL.Unicode
[]

[DbApi.Database.File.Samples]
SQLite3             = %CRW_DAQ_SYS_HOME_DIR%\resource\dbsamples\sample.db
Firebird            = %CRW_DAQ_SYS_HOME_DIR%\resource\dbsamples\sample.fdb
IB                  = %CRW_DAQ_SYS_HOME_DIR%\resource\dbsamples\sample.fdb
;==================== List of Database samples
Database.File.Samples = SQLite3,Firebird,IB
[]

[DbApi.ConnectionString.Samples.ADO]
;==================== IBPhoenix Open Source ODBC Driver (aka Firebird ODBC driver)
;==================== Download:   https://www.ibphoenix.com/download/connectivity/odbc
;==================== Download:   https://www.firebirdsql.org/en/odbc-driver/
;==================== Connection: https://www.connectionstrings.com/firebird/
ConnectionString    = Provider=MSDASQL;DRIVER=Firebird/InterBase(r) driver;DBNAME=localhost:employee;UID=SYSDBA;PWD=masterkey;
ConnectionString    = Provider=MSDASQL;DRIVER=Firebird/InterBase(r) driver;SERVER=localhost;DATABASE=employee;UID=SYSDBA;PWD=masterkey;
ConnectionString    = Provider=MSDASQL;DRIVER=Firebird/InterBase(r) driver;DBNAME=localhost:c:\db\employee.fdb;UID=SYSDBA;PWD=masterkey;
ConnectionString    = Provider=MSDASQL;DRIVER=Firebird/InterBase(r) driver;DBNAME=localhost:employee;UID=SYSDBA;PWD=masterkey;DIALECT=3;
ConnectionString    = Provider=MSDASQL;DRIVER=Firebird/InterBase(r) driver;DBNAME=localhost:employee;UID=SYSDBA;PWD=masterkey;PAGESIZE=8192;
ConnectionString    = Provider=MSDASQL;DRIVER=Firebird/InterBase(r) driver;DBNAME=localhost:employee;UID=SYSDBA;PWD=masterkey;DIALECT=3;PAGESIZE=8192;
ConnectionString    = Provider=MSDASQL;DRIVER=Firebird/InterBase(r) driver;DBNAME=localhost/3051:employee;UID=SYSDBA;PWD=masterkey;DIALECT=3;READONLY=YES;
;==================== IBProvider Free
ConnectionString    = Provider=LCPI.IBProvider.5.Free;Location=localhost:employee;User ID=SYSDBA;Password=masterkey;
ConnectionString    = Provider=LCPI.IBProvider.5.Free;Location=localhost:employee;User ID=SYSDBA;Password=masterkey;ctype=win1251;
ConnectionString    = Provider=LCPI.IBProvider.5.Free;Location=localhost:c:\Program Files\Firebird\Firebird_3_0\examples\empbuild\EMPLOYEE.FDB;User ID=SYSDBA;Password=masterkey;ctype=win1251;
;==================== SQLite3 ODBC Driver
;==================== Download:   http://www.ch-werner.de/sqliteodbc/
;==================== Connection: https://www.connectionstrings.com/sqlite3-odbc-driver/standard/
ConnectionString    = Provider=MSDASQL;DRIVER=SQLite3 ODBC Driver;Database=c:\mydb.db;
ConnectionString    = Provider=MSDASQL;DRIVER=SQLite3 ODBC Driver;Database=c:\mydb.db;Timeout=2000;
ConnectionString    = Provider=MSDASQL;DRIVER=SQLite3 ODBC Driver;Database=c:\mydb.db;LongNames=0;Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0;
ConnectionString    = Provider=MSDASQL;DRIVER=SQLite3 ODBC Driver;Database=c:\mydb.db;LongNames=0;Timeout=1000;NoTXN=0;SyncPragma=NORMAL;StepAPI=0;
ConnectionString    = Provider=MSDASQL;DRIVER=SQLite3 ODBC Driver;Database=c:\mydb.db;PWD=masterkey;Timeout=100000;StepAPI=0;NoTXN=0;NoWCHAR=0;NoCreat=0;LongNames=0;ShortNames=0;SyncPragma=NORMAL;FKSupport=0;OEMCP=0;BigInt=0;JDConv=0;
;==================== MySQL ODBC Driver
;==================== Download:   https://github.com/mysql/mysql-connector-odbc
;==================== Connection: https://www.connectionstrings.com/mysql/
ConnectionString    = Provider=MSDASQL;Driver=MySQL ODBC 8.0 ANSI Driver;Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;charset=win1251;
ConnectionString    = Provider=MSDASQL;Driver=MySQL ODBC 8.0 Unicode Driver;Server=localhost;Database=myDataBase;User=myUsername;Password=myPassword;Option=3;
;==================== PostgreSQL ODBC Driver
;==================== Download:   https://odbc.postgresql.org/
;==================== Connection: https://www.connectionstrings.com/postgresql/
ConnectionString    = Provider=MSDASQL;Driver=PostgreSQL ANSI;Server=localhost;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
ConnectionString    = Provider=MSDASQL;Driver=PostgreSQL Unicode;Server=localhost;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
ConnectionString    = Provider=MSDASQL;Driver=PostgreSQL ANSI;Server=localhost;Port=5432;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
ConnectionString    = Provider=MSDASQL;Driver=PostgreSQL Unicode;Server=localhost;Port=5432;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
[]

[DbApi.ConnectionString.Samples.SQLDB]
ConnectionString    = Provider=SQLite3;Database=c:\opt\daqgroup\share\dbsamples\sakila.db;Charset=utf8;
ConnectionString    = Provider=IB;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=IB;Database=c:\opt\daqgroup\share\dbsamples\sakila.fdb;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=IB;Database=c:\opt\daqgroup\share\dbsamples\employee.fdb;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=IB;Database=employee.fdb;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=IB;Database=localhost:/opt/crwdaq/demo/demo_data/employee.fdb;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=MySQL80;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=MySQL57;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=MySQL56;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=MySQL55;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=MySQL51;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=MySQL50;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=MySQL41;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=MySQL40;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=PQ;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=MSSQL;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=Sybase;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=Oracle;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=ODBC;DSN=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
[]

[DbApi.ConnectionString.Samples.ZEOS]
ConnectionString    = Provider=SQLite;Database=c:\opt\daqgroup\share\dbsamples\sakila.db;Charset=utf8;
ConnectionString    = Provider=Firebird;Database=employee;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=Firebird;Database=c:\opt\daqgroup\share\dbsamples\sakila.fdb;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=Firebird;Database=c:\opt\daqgroup\share\dbsamples\employee.fdb;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=mysql;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=mariadb;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=postgresql;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=mssql;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=sybase;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=oracle;Database=sakila;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=odbc_a;DSN=employee;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
ConnectionString    = Provider=odbc_w;DSN=employee;HostName=localhost;UserName=SYSDBA;Password=masterkey;Charset=utf8;
[]

[DbApi.SQL.Query.SelectAllTables]
SQLite              = select name from sqlite_master;
SQLite3             = select name from sqlite_master;
IB                  = select RDB$RELATION_NAME from RDB$RELATIONS R where R.RDB$SYSTEM_FLAG = 0;
Firebird            = select RDB$RELATION_NAME from RDB$RELATIONS R where R.RDB$SYSTEM_FLAG = 0;
PQ                  = select table_name from information_schema.tables where table_schema='public';
PQ                  = select table_name from information_schema.tables where table_schema='public' and table_type='base table';
PostgreSQL          = select table_name from information_schema.tables where table_schema='public';
PostgreSQL          = select table_name from information_schema.tables where table_schema='public' and table_type='base table';
MySQL               = show tables;
MySQL               = show tables from ${Database};
[]                  ; Use substitution ${Database}

[DbApi.SQL.Query.Samples]
select * from toc;
select * from country;
select * from employee;
select * from ${TABLE};
select * from sqlite_master;
select name from sqlite_master;
select RDB$RELATION_NAME from RDB$RELATIONS;
select RDB$RELATION_NAME from RDB$RELATIONS R where R.RDB$SYSTEM_FLAG = 0;
insert into country (country,currency) values ('Anlantida','Gold');
SHOW FULL TABLES FROM ${DBNAME};
select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA = '${DBNAME}';
select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='PUBLIC' and TABLE_TYPE='BASE TABLE';
select * from ${TABLE} order by X_TIME;
select X_TIME, Y_VALUE from ${TABLE} order by X_TIME;
select PAR_VALUE from "[CRW-DAQ DATA FILE]" where PAR_NAME = 'CurveList';
[] ; Use substitution ${TABLE}


[DbApi.DatabaseBrowser.Actions:Windows]
ActionDatabaseBrowserManual = @silent @run WebBrowser "%CRW_DAQ_SYS_HOME_DIR%\resource\manual\databasebrowsermanual.htm"
[]
[DbApi.DatabaseBrowser.Actions:Unix]
ActionDatabaseBrowserManual = @silent @run WebBrowser $CRW_DAQ_SYS_HOME_DIR/resource/manual/databasebrowsermanual.htm
[]


[DbApi.DatabaseBrowser.Samples]
employee
employee.fdb
sakila
sakila.fdb
c:\opt\daqgroup\share\dbsamples\toc.db
c:\opt\daqgroup\share\dbsamples\sakila.db
c:\opt\daqgroup\share\dbsamples\sample.db
c:\opt\daqgroup\share\dbsamples\chinook.db
c:\opt\daqgroup\share\dbsamples\department.db
c:\opt\daqgroup\share\dbsamples\northwind_small.db
c:\opt\daqgroup\share\dbsamples\ip.fdb
c:\opt\daqgroup\share\dbsamples\sakila.fdb
c:\opt\daqgroup\share\dbsamples\sample.fdb
c:\opt\daqgroup\share\dbsamples\employee.fdb
c:\opt\daqgroup\share\dbsamples\dim_ping_20250723.fdb
c:\opt\crwdaq\demo\demo_data\toc.db
c:\opt\crwdaq\demo\demo_data\sample.db
c:\opt\crwdaq\demo\demo_data\sample.fdb
c:\opt\crwdaq\demo\demo_data\employee.fdb
c:\opt\crwdaq\resource\dbsamples\sample.db
c:\opt\crwdaq\resource\dbsamples\sample.fdb
%CRW_DAQ_SYS_HOME_DIR%\demo\demo_data\toc.db
%CRW_DAQ_SYS_HOME_DIR%\demo\demo_data\sample.db
%CRW_DAQ_SYS_HOME_DIR%\demo\demo_data\sample.fdb
%CRW_DAQ_SYS_HOME_DIR%\demo\demo_data\employee.fdb
%CRW_DAQ_SYS_HOME_DIR%\resource\dbsamples\sample.db
%CRW_DAQ_SYS_HOME_DIR%\resource\dbsamples\sample.fdb
[]

[DbApi.Query.ListDatabases]
MSSQL      = SELECT name FROM master.sys.databases
mssql      = SELECT * FROM sys.databases d WHERE d.database_id > 4
PQ         = SELECT datname FROM pg_database
postgresql = SELECT datname FROM pg_database
[]

;*************************************************************************
;*** END OF FILE *********************************************************
;*************************************************************************
