Mimer SQL Documentation PREV NEXT

Mimer Developer Site


2.8 More Useful Examples

This section contains a few more useful example calls to SQLConfigDataSource. For more examples, see Example Configuration Program.

2.8.1 Example 1

This is the simplest possible call to create: a system data source, a Mimer SQL database and the system databank, and then start the database server:

rc = SQLConfigDataSource(NULL,ODBC_ADD_SYS_DSN,"MIMER", 
     "SDBGEN=-pSYSPSW DB6\0" 

2.8.2 Example 2

The following call passes control to the user to perform all customization of a database.

The user may not change the data source name (as governed by the specification of SQLConfigDataSource), so the application knows how to connect to the database through the application defined data source name:

rc = SQLConfigDataSource(hWnd,ODBC_ADD_SYS_DSN,"MIMER", 

Please note that specifying an empty DIRECTORY allows SQLConfigDataSource to identify that a local database should be created.

2.8.3 Example 3

In this example, the database server is stopped and then the definition is deleted along with the data source definition.


2.8.4 Example 4

This example demonstrates how to remove a Mimer SQL license key.

rc = SQLConfigDataSource(NULL, ODBC_REMOVE_SYS_DSN, 

2.8.5 Example 5

This example demonstrates how to remove an ODBC data source.

rc = SQLConfigDataSource(NULL, ODBC_REMOVE_SYS_DSN, 

Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
Mimer SQL Documentation PREV NEXT