U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » How to display fields from different tables in one SQLArray
Re: template + convert problem [message #23157 is a reply to message #23155] Sat, 19 September 2009 22:45 Go to previous messageGo to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

andrei_natanael wrote on Sat, 19 September 2009 21:59

You don't really need a template for this. You may create a setter and initialize the converter with proper values. Something like...
struct ConvDict : Convert
{
    SqlId TBL ,ID, NAME, CLEARTIME;
public:
    void setValues(SqlId _TBL ,SqlId _ID, SqlId _NAME,int _CLEARTIME)
    {
        TBL = _TBL;
        ID = _ID;
        NAME = _NAME;
        CLEARTIME = _CLEARTIME;
    }
// ...

The only inconvenient is that you have to call setValues before using converter.


template is interesting because you can create separate converters for different reference tables designating the tables at the time of use in the code.
(I once again repeat - a lot of reference tables, and many links to them from the main table.)


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DBF crash error while writing record
Next Topic: PATCH/BUGFIX Oracle asTable Failure - Solution
Goto Forum:
  


Current Time: Sat Apr 25 15:13:23 GMT+2 2026

Total time taken to generate the page: 0.00770 seconds