Adding Data Sources with registry keys

Previous  Top  Next


The appropriate tool to add data sources is the ODBC Administrator. Since this tool just adds some registry tools, it is possible to add the necessary keys in an own application. 

Here is an example to add the system dsn "MyApp" using registry keys only:

1) Create a new registry key in "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI"  and name it to "MyApp"

2) Add these values to the new created key:

Name

Type

Value

DefaultLocation

REG_SZ

full path to TurboDB data file (*.tdbd) or directory storing TurboDB tables (*.dat)

Description

REG_SZ

optional description for this entry

Driver

REG_SZ

driver file including full path on the end users machine eg. C:\Programs\dataweb\ODBC\TdbOdbc32.dll

Exclusive Mode

REG_SZ

False/True depending if tables should be opened in single user mode preventing other users to open it

LogLevel

REG_SZ

0

PrivateDirectory

REG_SZ

directory to store temporary tables and log files. If blank then the default temp directory will be used

ReadOnly Mode

REG_SZ

False/True depending if tables should be opened with read access only