Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

RE: populating the result object - 2: msg#00050

db.mysql.c++

Subject: RE: populating the result object - 2

Thanks for the suggestions......
The reason why I cannot use the vector object is becoz.....first of all u
need to execute a query and do a query.storein(vector).....but in my
case....i don't want to execute an SQL query....as i have already executed
a query on my other database the result of which is a string form of the
xml document......
so my problem boils down to this......given a set of row and column values
as strings....can u populate a result object without creating a connection
or a query object...almost like storing key-value pairs into the result
object....

Thanks,
Vinay

On Sun, 16 May 2004, Tom Riggs wrote:

> Have you considered writing a routine to bring the data from you xml file
> into a table in your database and then query it? The only other way I see
> would not be so simple it would involve researching the MYSQL code to
> determine how to "insert" the values into the result object. However it just
> occurred to me that one of the examples uses a vector object to receive the
> query result. Perhaps you could look at that as a way to implement what you
> are trying to accomplish.
>
> -----Original Message-----
> From: Vinay Sambamurthy [mailto:vsmurthy@xxxxxxxxxxxxx]
> Sent: Sunday, May 16, 2004 5:06 PM
> To: Tom Riggs
> Cc: plusplus@xxxxxxxxxxxxxxx
> Subject: RE: populating the result object - 2
>
> 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@xxxxxxxxxxxxx]
> > Sent: Friday, May 14, 2004 2:18 PM
> > To: plusplus@xxxxxxxxxxxxxxx
> > 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=tom@xxxxxxxxx
> >
>

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
ide.eclipse.wtp...    bug-tracking.ro...    xfree86.cvs/200...    lisp.wxcl.devel...    file-systems.ar...    kde.devel.kwrit...    jakarta.jetspee...    qnx.openqnx.dev...    drivers.openib/...    ports.xbox.deve...    gis.gdal.devel/...    netbsd.ports.ma...    ubuntu.marketin...    systemtap/2005-...    web.omniweb/200...    mail.qmail.ldap...    hardware.soekri...    os.netbsd.devel...    audio.madman.ge...    tv.freeguide-tv...    cluster.openmos...    education.ezpro...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation