Product Home
DTM Data Generation SDK Online Documentation
Product Profile
SDK components
Functions map
Low level API
Short Random
Integer Random
Random Symbol
Double Random
Random String
Random Date
Random Time
C/C++ example
Fill Methods level API
From list
From file
From table
From Values Library
Incremental
By maks
By SQL statement
Rule level API
Rule properties
Rule items
One rule item
Project level API
Project operations
Project properties
Project rules
Object handles
Database connection
Error handling
SDK limitations
Build application with SDK
License agreement

Database connections

The standard and professional versions of SDK allows the user to create a few database connections. The connection can be used to generate test data as a source of the data. Please refer to from table and by SQL fill methods for details

Connect to database
C/C++
DG_HANDLE ConnectDB(char *DataSource, char *user, char *Password, char *database)

Important: please use empty strings instead of null pointers for optional parameters.

C#/VBA/scripts
int ConnectDB(string DataSource, string user, string Password, string database)

'DataSource' is name of predefined ODBC data source. Please use ODBC Administrator (odbcad32.exe or Control Panel icon) to prepare this name.
'user' and 'password' are optional and define login (user name) that will be used for connection.
'database' is optional as well and can be use with Microsoft SQL server only.

Disconnect
C/C++/C#
void DisconnectDB(DG_HANDLE connection)