source: trunk/examples/sql/overview/create_connections/main.cpp

Last change on this file was 202, checked in by rudi, 14 years ago

Added SQL examples

File size: 878 bytes
Line 
1/****************************************************************************
2** $Id: main.cpp 2051 2007-02-21 10:04:20Z chehrlic $
3**
4** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
5**
6** This file is part of an example program for Qt. This example
7** program may be used, distributed and modified without limitation.
8**
9*****************************************************************************/
10
11#include <qapplication.h>
12#include <qsqldatabase.h>
13#include "../connection.h"
14
15int main( int argc, char *argv[] )
16{
17 QApplication app( argc, argv, FALSE );
18
19 if ( createConnections() ) {
20 // Databases successfully opened; get pointers to them:
21 QSqlDatabase *oracledb = QSqlDatabase::database( "ORACLE" );
22 // Now we can now issue SQL commands to the oracle connection
23 // or to the default connection
24 }
25
26 return 0;
27}
Note: See TracBrowser for help on using the repository browser.