|
|
Choosing A Webhost: |
RE: How to overcome a runtime error when there is no matching in database: msg#00055db.mysql.c++
I am sorry for the shortage of the provided information. However, a partial code snippet is shown below, take note that the "attributesList" container is always containing records: ------------------------------------------------------ Structures.h file contains the following SSQLS: sql_create_5(_ATTRIBUTES_LIST, 2, 0, sql_smallint_unsigned, attribute_id, sql_int_unsigned, vendor_id, sql_varchar, vendor_name, sql_varchar, attribute_name, sql_smallint_unsigned, type_id); ------------------------------------------------------ Configurations.h files contains the following data members and member functions: #include "Structures.h" Class Configurations.h { public: Configurations(Query *configurationsQuery, const bool *debugMode) { populateAttributesInformation(configurationsQuery, debugMode); } string getAttributeName(unsigned short attribute_id, unsigned short vendor_id) { /////Run time error occurs in the following step when /////there is no match found. It is similar to the SQL /////command "SELECT attribute_name FROM attributes_tabel /////WHERE attribute_id = somevalue AND vendor_id = othervalue /////It has to return a NULL or zero when there is no data are ////// found. return attributesList.lower_bound(_ATTRIBUTES_LIST(attribute_id, vendor_id))->attribute_name; } private: static set<_ATTRIBUTES_LIST> attributesList; void populateAttributesInformation(Query *attributesQuery, const bool *debugMode) { attributesQuery->reset(); *attributesQuery << "SELECT a.attribute_id, a.vendor_id, v.vendor_name, a.attribute_name, a.type_id\nFROM attributes_table AS a INNER JOIN vendors_table AS v\nON a.vendor_id = v.vendor_id\nORDER BY a.vendor_id ASC, a.attribute_id ASC"; if (*debugMode) { cout << "\n\nQuerying Radius database for attributes data and populate into memory" << endl << endl; cout << attributesQuery->preview() << endl << endl; } attributesQuery->storein(attributesList); } }; -----Original Message----- From: Warren Young [mailto:mysqlpp@xxxxxxxxxxx] Sent: Tuesday, February 27, 2007 5:15 PM To: MySQL++ Mailing List Subject: Re: How to overcome a runtime error when there is no matching in database Bassam A. Al-Khaffaf wrote: > Your solution doesn't work with my case. The "attributeList" is always fill > with data, Please provide a more detailed example. Ideally, it should compile and run against the MySQL++ sample database. We don't even know what data type attributeList is, or how it gets filled. It's awfully hard to guess at solutions with such limited information. -- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=bassam@xxxxxxxxxxxxx -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.4/703 - Release Date: 2/26/2007 2:56 PM -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.4/703 - Release Date: 2/26/2007 2:56 PM -- 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: | Re: How to overcome a runtime error when there is no matching in database, Warren Young |
|---|---|
| Next by Date: | SSL Connection error, fred ouille |
| Previous by Thread: | Re: How to overcome a runtime error when there is no matching in database, Warren Young |
| Next by Thread: | Re: How to overcome a runtime error when there is no matching in database, 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 |