Hi,
The class which I am constructing inherits a base class where
everything is in sql form and it has a pure virtual function which
returns a mysql++ Result object. This function needs to be
overridden in my class. The reason behind the base class returning a
Result object is so that all it's derived classes irrespective of which
database it is...can be stored in this mySql++ Result object format from
which i can extract data in a similar way (which means that the main
reason for the Result object is so that I can retrieve data from it using
mySql++ commands like row[i] which would return the ith row in the
Result object). Also, the other database I am
talking abt uses Sql statements for insert, delete, etc internally...but
it exposes different methods such as List, Add etc (which are self
explanatory) through it's WSDL (it's a webservice to which I am
communicating through my C++ class)
Regards,
Vinay
On Sun, 16 May 2004, Tom Riggs wrote:
> I have watched this thread and I do not understand why you would want to
> populate a result object in this way. I am still new to this also but as I
> understand it the purpose of the result object is to then pull the
> information from the query out and perform operations on it like printing or
> display or modify. You have data in another format are you trying to insert
> the data into the MYSql database? If so then you can write code to create
> the appropriate insert query from the data you have. What is it that you
> want to do with this data that makes you believe that it should be in a
> result object?
>
> -----Original Message-----
> From: Vinay Sambamurthy [mailto:vsmurthy@stripped]
> Sent: Friday, May 14, 2004 2:18 PM
> To: plusplus@stripped
> Subject: populating the result object - 2
>
> Hi,
> I have an XML document which i retrieved from some database using
> commands specific to that database. The Xml document contains "field"
> elements of this type
>
> Ex: <field name="id" type="integer">10</field>
> <field name="currenttime" type="time">20:10:30</field>
> <field name="createdBy" type="string">bob</field>
> and so on....
>
> Now I need to construct a mySQL++ Result object out of it..i.e, i need to
> populate a Result object. But the mySQL++ examples I saw on the internet,
> first construct a query (say for example for retrieving some values) and
> then
> execute
> Result res = query.store();
>
> But in my case, I have already executed the query using some command that
> the database supports(not mySQL++) and I get a string containing the XML
> document(described above) as the result of that query. Now is there some
> <way, that I can just populate a Result object with these values? By
> explicity executing some commands like say(for example), res.insertElement
> or something like that, can I populate the Result object?
>
> Thanks
> Vinay
>
>
> --
> MySQL++ Mailing List
> For list archives: http://lists.mysql.com/plusplus
> To unsubscribe: http://lists.mysql.com/plusplus?unsub=1
>