Kexi API Documentation (2.0 alpha)

Kross::KexiDB::KexiDBConnection Class Reference

#include <kexidbconnection.h>

Inheritance diagram for Kross::KexiDB::KexiDBConnection:

Class List of all members.

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.
 if not connection.connect(): raise("Failed to connect with db")
 # Open database for usage. The filebased driver uses the filename as databasename.
 if not connection.useDatabase("/home/user/kexisqlite3file.kexi"): raise("Failed to use db")

Definition at line 68 of file kexidbconnection.h.

Public Member Functions

 KexiDBConnection (::KexiDB::Connection *connection, KexiDBDriver *driver=0, KexiDBConnectionData *connectiondata=0)
virtual ~KexiDBConnection ()
virtual const QString getClassName () const


Constructor & Destructor Documentation

KexiDBConnection::KexiDBConnection ::KexiDB::Connection connection,
KexiDBDriver driver = 0,
KexiDBConnectionData connectiondata = 0
 

Definition at line 38 of file kexidbconnection.cpp.

KexiDBConnection::~KexiDBConnection  )  [virtual]
 

Definition at line 94 of file kexidbconnection.cpp.


Member Function Documentation

const QString KexiDBConnection::getClassName  )  const [virtual]
 

Definition at line 97 of file kexidbconnection.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:51:05 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003