|
|
Sponsor |
RE: Large class to table: msg#00036db.mysql.c++
There are << >> overloads for the 'Query' object. You can do something like Query query = con.query(); if (query) { query << "INSERT INTO " << <table> "(" << <Field1> "," << <Field2> << "," ... ")" << "VALUES (" << <value1> << "," << <value2> << "," ... ");"; ResNSel result = query.execute(); if (result) long rows_affected = result.rows; } Of course, it's all relative. The above SQL string created with 40+ field-value pairs could also be hard to maintain. HTH...steve--- Steven J Orton Software Engineer Northrop Grumman Mission Systems Middletown, RI 02842 -----Original Message----- From: Jim Langston [mailto:serpardum@xxxxxxxxx] Sent: Wed 6/21/2006 2:51 AM To: MySql++ Subject: Large class to table I have a few large classes which I wish to save to a MySQL table. Currently I am saving them to flat files using override>> and override<< with streams. By large I mean 47+ variables/fields. I'm trying to determine the best way to do this using MySQL++. I've been looking at SSQLS but think it would be a real pain to maintain. I really didn't see an override for >> or << in the documentation, but I may have just missed is. Is there an override that will let me do something like: con.something() << Field1 << field2 << field3 << field4; con.insert(); // or something con.something() >> Field1 >> field2 >> field3 >> field; etc? -- 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> |
|---|---|---|
| Previous by Date: | Query Object Memory Leak?, Bill K |
|---|---|
| Next by Date: | Re: CLIENT_FOUND_ROWS, Warren Young |
| Previous by Thread: | Large class to table, Jim Langston |
| Next by Thread: | Re: Large class to table, Warren Young |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|