List:MySQL++« Previous MessageNext Message »
From:Thomas Werth Date:August 18 2005 1:17pm
Subject:Re: problems using mysql++ > 2.0.0
View as plain text  
No it is an local var. Here's code for more information

[code]
bool CMySqlConnector::executeSelect		( std::string sql, mysqlpp::Result
&result, bool log ) //Achtung Mysql++ hat Speicherloch bei Query.store()
in combination mit std::string
{	
	try
	{
		Query	query	= m_clConnection.query();
		//Backslashes doublen
		replaceSubstring( &sql, "\\", "\\\\" );
		//SQL statement an query weitergeben
		query << sql.c_str();
		//ausführen
		result = query.store();
		return true;		
	}		
	catch (std::exception &er)
	{
		//skipped
	}	
	return false;
}	

[/code]
When running in try block right after leaving with return debug assert
hits in .
I'm using this func in this way :
Result myResult;
executeSelect( "select * from example", myResult, true );


CJNoyesSW@stripped schrieb:
> Was the query constructed with new? The error is happening because the
> pointer doesn't point to one of VC++'s heaps. 
>  
> -----Original Message-----
> From: Thomas Werth <thomas.werth@stripped>
> To: MySQL++ Mailing List <plusplus@stripped>
> Sent: Thu, 18 Aug 2005 11:11:03 +0200
> Subject: problems using mysql++ > 2.0.0
> 
> Hello,
> 
> 
> I'm using mysql++ for a project in vc2003. Now h'm trying to switch to
> new lib version.
> I managed to compile mysqlpp lib using makefiles.
> When using makefiles i notice 2 things.
> 
> First when running "makemake.bat vc" i get an error "make.bat not found".
> When looking into makemake.bat i discovered at end of file a "call
> make.bat" whereas this make.bat isn't created in mysqlpp root dir nor is
>  it delivered in basic install. I'm just ignoring this :D
> 
> Second this is a harder problem.
> Using mysqlpp as dll in release version of my project seem to run fine.
> Unfortunately in debug it always crashes when a local var ( like Query )
> is destructed. It  throws an assertion using internal debug func
> "_CrtIsValidHeapPointer".
> 
> When looking a Readme.vc at part "Using MySQL++ in Your Own Projects"
> 
> Debug settings are shown this way
> 
> <<
> Under Linker::General add to "Additional Library
>           Directories": "c:\mysql\lib\debug, c:\mysql++\vc\lib" for
>           the Debug configuration.  For the Release configuration,
>           make it "c:\mysql\lib\opt, c:\mysql++\lib"
>>>
> 
> Unfortunately no vc subdir is created.
> I set "INST_DIR=F:\dev\Projekte\cpp\mysql++\vc" in makefile.vc in lib
> dir, but nothing is created neither dir nor any files in there.
> 
> What am i doing wrong ? How do i tell makefile to create a debug version
> of lib ?
> 
> greets
> Thomas Werth
> 
> -- 
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe:    http://lists.mysql.com/plusplus?unsub=1
> 

-- 
MFG
Thomas Werth

Tel.: 02307 / 704 - 366
---------------------------------------------------------------------

Paul Vahle GmbH & Co. KG              URL       : http://www.vahle.de
Westicker Strasse 52  D-59174 Kamen   E-Mail    : thomas.werth@stripped
---------------------------------------------------------------------

Thread
problems using mysql++ > 2.0.0Thomas Werth18 Aug
  • Re: problems using mysql++ > 2.0.0Warren Young18 Aug
    • Re: problems using mysql++ > 2.0.0Thomas Werth19 Aug
      • Re: problems using mysql++ > 2.0.0Warren Young19 Aug
Re: problems using mysql++ > 2.0.0Thomas Werth18 Aug
  • Re: problems using mysql++ > 2.0.0Warren Young18 Aug