hk_connection connects to the SQL Server. The most important functions are set_host(), set_user(), set_password() and connect().
- void set_host(const hk_string&)
sets the host name or host IP number
- hk_string host(void)
- void set_user(const hk_string& )
sets the user name used on the host
- hk_string user(void)
- void set_password(const hk_string&p)
sets the password for the user
- void set_tcp_port(unsigned int t)
sets the TCP port
- unsigned int tcp_port(void)
- virtual unsigned int default_tcp_port(void) const
returns the default TCP port for this database server
- bool connect(enum_interaction c=interactive)
connects to the server using the user, host and TCP data
- bool disconnect(void)
disconnects from the server
- bool is_connected(void)
returns true if this connection is connected to the server
- vector<hk_string>* dblist(void)
returns a list of all existing databases in this connection
- hk_database* new_database(const hk_string&name="")
creates a new hk_database object
- bool delete_database(const hk_string&dbase)
deletes an exisiting database
- bool database_exists(const hk_string&databasename)
returns true if the database "databasename" exists