hk_database
Prev | Chapter 4. using hk_classes as a Python module | Next

## hk_database

hk_database represents a particular database on the SQL Server

> vector<hk_string>* tablelist(void)

>   returns a list of all existing tables in this database

> vector<hk_string>* querylist(void)

>   returns a list of all existing queries in this database

> vector<hk_string>* formlist(void)

>   returns a list of all existing forms in this database

> vector<hk_string>* reportlist(void)

>   returns a list of all existing reports in this database

> hk_datasource* new_table(const hk_string&name="",hk_presentation* p=NULL)

>   gets a new table object of type hk_datasource (read and write)

> hk_datasource* new_resultquery(hk_presentation* p=NULL)

>   gets a new query object of type hk_datasource (readonly)

> hk_actionquery* new_actionquery(void)

>   gets a hk_actionquery object. It can execute SQL statements that don't return data and are only successful or not successful (e.g. CREATE TABLE)

> hk_datasource* load_datasource(const hk_string&name,bool query=false,hk_presentation* p=NULL)

>   a convenience function for new_table and new_resultquery, that loads an existing datasource

> bool delete_table(const hk_string&table,enum_interaction x=interactive)

>   deletes a table

> bool table_exists(const hk_string&tablename)

>   returns true if the table 'tablename' exists

> bool query_exists(const hk_string&queryname)

>   returns true if the query 'queryname' exists

Prev | Up | Next
hk_connection | Home | Chapter 5. Tips and tricks