List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:July 22 2008 5:27pm
Subject:Re: Fatal error running the MFC example application.
View as plain text  
Bernard wrote:
> 
> During the build there were 14 argument conversion warnings encountered:

Fixes for these will appear in the next version of MySQL++.  You can 
ignore all of them for now.

> std::out_of_range at memory location 0x0012ef8c..

Oops...the VC++ GUI examples didn't get updated to track some of the 
MySQL++ v3 changes.  Find the comment "// Display the result set" in 
mfc_dlg.cpp and replace that loop with this:

         // Display the result set
         for (size_t i = 0; i < res.num_rows(); ++i) {
             if (ToUCS2(awcTempBuf, kTempBufSize, res[i][0])) {
                 AddMessage(awcTempBuf);
             }
         }

That'll fix it.

wforms/MainForm.h needs a similar fix:

                 // Display the result set
                 for (size_t i = 0; i < res.num_rows(); ++i) {
                     AddMessage(ToUCS2(res[i][0]));
                 }

These fixes will also appear in the next version of MySQL++.
Thread
Fatal error running the MFC example application.Bernard14 Jul
  • Re: Fatal error running the MFC example application.Warren Young22 Jul