

#include <iostream>
#include <sstream>
#include <mysql++.h>

int main()
{

    mysqlpp::Connection conn("valid details here");
    mysqlpp::Query with_preview(&conn);
    mysqlpp::Query no_preview(&conn);

    // innocuous sql that should work for any table
    with_preview << "start transaction";
    no_preview << "start transaction";

    try
    {
	no_preview.execute();
	
	std::cerr << "************" << std::endl;
	
	with_preview.preview();

	with_preview.execute();
	
    }

    catch (const mysqlpp::Exception &e)
    {
	std::cerr << e.what() << std::endl;
    }
    
    return 0;
}
    

    

