List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:December 7 2004 5:35pm
Subject:Re: Problem with Visual Studio .Net 2003
View as plain text  
Pitu Caleya wrote:
> 
> To simplify, when running this code it works:
> 
> Query query;
> query << "INSERT INTO...";

Okay, so why aren't you doing it that way?

> But, when calling the base class operator <<, it fails:
> 
> Query query;
> ((SQLQuery) query) << "INSERT INTO...";

You aren't calling the base class operator<< !  You are 'slicing' the 
object, causing who knows what kind of havoc.  Read a C++ language text 
if you don't know what slicing is.

To call the base class, you need a pointer or a reference.  And, again, 
I don't see why you're interested in using SQLQuery directly anyway. 
It's not designed to be used directly.  The only reason it even exists 
goes back to a past design dream that has since died.  I oughtta fold 
the two classes into one....
Thread
Problem with Visual Studio .Net 2003Pitu Caleya2 Dec
  • Re: Problem with Visual Studio .Net 2003Warren Young2 Dec
    • Re: Problem with Visual Studio .Net 2003Warren Young6 Dec
Re: Problem with Visual Studio .Net 2003Pitu Caleya7 Dec
  • Re: Problem with Visual Studio .Net 2003Warren Young7 Dec
    • Re: Problem with Visual Studio .Net 2003Pitu Caleya8 Dec
Re: Problem with Visual Studio .Net 2003Warren Young9 Dec
Re: Problem with Visual Studio .Net 2003Pitu Caleya9 Dec
  • Re: Problem with Visual Studio .Net 2003Warren Young10 Dec
    • Re: Problem with Visual Studio .Net 2003Pitu Caleya10 Dec