Represents a particular existing database on the SQL Server. To use it set the name of an existing database with set_name(). To create a new database use hk_connection.create_database().
Inherits from hk_class.
- tablelist()
returns a list of all existing tables in this database
- querylist()
returns a list of all existing queries in this database
- formlist()
returns a list of all existing forms in this database
- reportlist()
returns a list of all existing reports in this database
- new_table([name[,presentation]])
returns a new table object of type hk_datasource (read and write)
Parameter 'name': the name of the table
Parameter 'presentation': a presentation object (either a form or a report) that administers this table. In most cases you don't have to set this parameter.
- new_resultquery([presentation])
returns a new resultquery object of type hk_datasource (readonly)
Parameter 'presentation': a presentation object (either a form or a report) that administers this query. In most cases you don't have to set this parameter.
- new_actionquery()
returns 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)
- load_datasource(name[,query [,presentation]])
a convenience function for new_table and new_resultquery, that loads an existing datasource
- delete_table(tablename [,interactive])
deletes a table. Returns True if successful.
Parameter 'tablename': the name of the table
Parameter 'interactive': if set to interactive and the function fails, warning message appears. Possible values
hk_class.noninteractive
hk_class.interactive
- table_exists(tablename)
returns true if the table 'tablename' exists
- query_exists(queryname)
returns true if the query 'queryname' exists