# class hk_drivermanager

Database Driver administration. More...

Definition | `#include <hk_classes/hk_classes/hk_drivermanager.h>`
Inherits | hk_class [public ]
List of all Methods

Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- hk_drivermanager (void)
- hk_drivermanager (bool runtime)
- ~hk_drivermanager (void)
- hk_connection* new_connection (const hk_string& drivername="",enum_interaction i=interactive)
- hk_connection* find_existing_connection (const hk_string& drivername,const hk_string& host,unsigned int tcp_port,const hk_string& user)

#### Public Static Methods

- static vector<hk_string>* driverlist (void)
- static void set_path (const hk_string& path)
- static hk_string path (void)
- static void set_driverselectdialog (requestdialogtype* dialog)
- static hk_string show_driverselectdialog (void)

## Detailed Description

This class allows you to handle the database drivers. You can get a new connection to a database with new_connection.

hk_drivermanager (void)

### hk_drivermanager

Parameters:

runtime | if true the user has no possibility to change table and form structures or query statements

hk_drivermanager (bool runtime)

### hk_drivermanager

~hk_drivermanager (void)

### ~hk_drivermanager

hk_connection* new_connection (const hk_string& drivername="",enum_interaction i=interactive)

### new_connection

with this method you can create a new connection to a database. If no driver is set a dialog appears which asks for the driver. You can set a GUI dependend driverdialog with set_driverselectdialog.

Parameters:

drivername | name of the wished database driver (i.e. mysql)
i | if i is set to 'interactive' warningmessages and dialog boxes will be shown

Returns: a driver specific version of hk_connection or NULL if no driver could be found.

hk_connection* find_existing_connection (const hk_string& drivername,const hk_string& host,unsigned int tcp_port,const hk_string& user)

### find_existing_connection

If an already created connection exists, it will be returned otherwise NULL

vector<hk_string>* driverlist (void)

### driverlist

[static]

void set_path (const hk_string& path)

### set_path

[static]

Path to the directory where the database drivers are stored.(default: /usr/local/hk_classes/drivers)

hk_string path (void)

### path

[static]

void set_driverselectdialog (requestdialogtype* dialog)

### set_driverselectdialog

[static]

you can write your own GUI dependend function to show a driver select dialog by defining a function of requestdialogtype

hk_string show_driverselectdialog (void)

### show_driverselectdialog

[static]

- Version: $Revision: 1.15 $
- Author: Horst Knorr (hk_classes@knoda.org)
- Generated: horst on horstnotebook on Tue Mar 30 19:06:43 2004, using kdoc 2.0a54.