First page Back Continue Last page Graphics
Python Scripting Example for KexiDB
Opening Data Table View (looks similar in C++)
# setup data
driverManager = kexidb.DriverManager()
driver = drivermanager.driver("SQLite3")
connData = drivermanager.createConnectionData()
db="/home/foo/project.kexi"
connData.setFileName(db)
connection = driver
.createConnection(connData)
connection.connect()
connection.useDatabase(db)
# setup gui
carsTable = connection.tableSchema("cars")
cursor = connection.prepareQuery( carsTable )
tableView = KexiDataTableView(0, cursor)
tableView.show()