c++

Upload: abcd123425

Post on 10-Jan-2016

213 views

Category:

Documents


0 download

DESCRIPTION

c++ code for sql

TRANSCRIPT

/* Copyright 2008, 2010, Oracle and/or its affiliates. All rights reserved.This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; version 2 of the License.There are special exceptions to the terms and conditions of the GPLas it is applied to this software. View the full text of theexception in file EXCEPTIONS-CONNECTOR-C++ in the directory of thissoftware distribution.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA*//* Standard C++ includes */#include #include /* Include directly the different headers from cppconn/ and mysql_driver.h + mysql_util.h (and mysql_connection.h). This will reduce your build time!*/#include "mysql_connection.h"#include #include #include #include using namespace std;int main(void){cout createStatement(); res = stmt->executeQuery("SELECT 'Hello World!' AS _message"); while (res->next()) { cout