Kross::KexiDB::KexiDBConnection Class Reference
#include <kexidbconnection.h>
Inherits Kross::Api::Class< KexiDBConnection >.
Public Member Functions | |
| KexiDBConnection (::KexiDB::Connection *connection, KexiDBDriver *driver=0, KexiDBConnectionData *connectiondata=0) | |
| virtual const TQString | getClassName () const |
Detailed Description
A connection to a database.
Example (in Python) ;
# Import the kexidb module.
import krosskexidb
# Get the drivermanager.
drivermanager = krosskexidb.DriverManager()
# We need a connectiondata object.
connectiondata = drivermanager.createConnectionData()
# Fill the new connectiondata object with what we need to connect.
connectiondata.setFileName("/home/user/kexisqlite3file.kexi")
# Create the database-driver to access the SQLite3 backend.
driver = drivermanager.driver("SQLite3")
# Create the connection now.
connection = driver.createConnection(connectiondata)
# Establish the connection.
# Open database for usage. The filebased driver uses the filename as databasename.
bool useDatabase(const TQString &dbName, bool kexiCompatible=true, bool *cancelled=0, MessageHandler *msgHandler=0)
Opens an existing database specified by dbName.
Definition connection.cpp:537
Definition at line 68 of file kexidbconnection.h.
Constructor & Destructor Documentation
◆ KexiDBConnection()
| KexiDBConnection::KexiDBConnection | ( | ::KexiDB::Connection * | connection, |
| KexiDBDriver * | driver = 0, |
||
| KexiDBConnectionData * | connectiondata = 0 |
||
| ) |
Definition at line 38 of file kexidbconnection.cpp.
◆ ~KexiDBConnection()
|
virtual |
Definition at line 94 of file kexidbconnection.cpp.
Member Function Documentation
◆ getClassName()
|
virtual |
Definition at line 97 of file kexidbconnection.cpp.
The documentation for this class was generated from the following files:
