Professional Web Applications Themes

mysql++ i mysqlpp::Query problem - MySQL

Hello all! I've a problem with mysql++-2.1.1 examples. Compiler compiles properly but when I create Query object program crashes (when it is running). This constructor (creating connection) works well: mysqlpp::Connection con("information_schema", "localhost","root","pass",3306); //creating new database works properly too //con.create_db("nowa_db"); ,but when I add next line (it compiles well) mysqlpp::Query query = con.query(); program (Visual C++) shows error in sreambuf file: virtual __CLR_OR_THIS_CALL ~basic_streambuf() { // destroy the object _DELETE_CRT(_Plocale); } So if you have any ideas write, please Thanks a lot....

  1. #1

    Default mysql++ i mysqlpp::Query problem

    Hello all!
    I've a problem with mysql++-2.1.1 examples. Compiler compiles properly
    but when I create Query object program crashes (when it is running).

    This constructor (creating connection) works well:

    mysqlpp::Connection con("information_schema",
    "localhost","root","pass",3306);

    //creating new database works properly too
    //con.create_db("nowa_db");

    ,but when I add next line (it compiles well)
    mysqlpp::Query query = con.query();

    program (Visual C++) shows error in sreambuf file:


    virtual __CLR_OR_THIS_CALL ~basic_streambuf()
    { // destroy the object
    _DELETE_CRT(_Plocale);
    }


    So if you have any ideas write, please
    Thanks a lot.

    jaccurek@op.pl Guest

  2. #2

    Default Re: mysql++ i mysqlpp::Query problem

    I found out that the problem is in destructor of Query object
    When I create this dynamic:

    mysqlpp::Query *and = new mysqlpp::Query(baza.query());

    ...and I don't use delete - program works

    Other objects i.e.

    mysqlpp::Result
    mysqlpp::Row

    have to be create dynamic too.

    It seems to be a problem in destructors. Can anyone help me?

    I use mysql++-2.1.1, VC++ 2005

    jaccurek@op.pl Guest

Similar Threads

  1. mySQL query writing problem
    By JackM in forum MySQL
    Replies: 2
    Last Post: July 16th, 02:18 AM
  2. Query problem moving from mysql 4 to 5
    By Justin Koivisto in forum MySQL
    Replies: 2
    Last Post: February 21st, 03:09 PM
  3. MySQL Query Problem
    By cf101 in forum Coldfusion Database Access
    Replies: 7
    Last Post: June 10th, 07:45 PM
  4. Problem with MySQL Query
    By Phillip Blancher in forum PHP Development
    Replies: 13
    Last Post: January 14th, 09:14 AM
  5. PHP/MySQL Query Problem in Dreamweaver
    By Aeris Leonna in forum PHP Development
    Replies: 2
    Last Post: October 20th, 03:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139