| 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 2003 | Pitu Caleya | 2 Dec |
| • Re: Problem with Visual Studio .Net 2003 | Warren Young | 2 Dec |
| • Re: Problem with Visual Studio .Net 2003 | Warren Young | 6 Dec |
| • Re: Problem with Visual Studio .Net 2003 | Pitu Caleya | 7 Dec |
| • Re: Problem with Visual Studio .Net 2003 | Warren Young | 7 Dec |
| • Re: Problem with Visual Studio .Net 2003 | Pitu Caleya | 8 Dec |
| • Re: Problem with Visual Studio .Net 2003 | Warren Young | 9 Dec |
| • Re: Problem with Visual Studio .Net 2003 | Pitu Caleya | 9 Dec |
| • Re: Problem with Visual Studio .Net 2003 | Warren Young | 10 Dec |
| • Re: Problem with Visual Studio .Net 2003 | Pitu Caleya | 10 Dec |
