From: Warren Young Date: December 7 2004 5:35pm Subject: Re: Problem with Visual Studio .Net 2003 List-Archive: http://lists.mysql.com/plusplus/3757 Message-Id: <41B5E9D2.5010307@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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....