Narrow width layout Medium width layout Full-screen width layout    Small text Medium text Large text    Color Palette Selector      Search
Register  |  
Forum policy    

These Discussion Forums are dedicated to discussions on Sophis products. Some are private, you shall be connected to see their content.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to Sophis products.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Publishing information for insider trades or other illegal trading is forbidden and will be reported,
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Private messaging between users is enable. If you already put a message on forums, a registered user can send you a private message by clicking on the username link, and thus on the "Message User" link on the "Private Messaging" row. The messages can be read by clicking on the Inbox button of the toolbar.

 
Forums    
 
  Forum  Development  Instruments  How to get the convention?
Previous Previous
 
Next Next
New Post 9/25/2008 12:41 PM
  Philippe Bonneau
254 posts
www.ebsys.fr
1st Level Poster


How to get the convention? 
Modified By Philippe Bonneau  on 9/25/2008 11:42:11 AM)

Hi,

In order to retrieve the value of the column Convention in the instrument list, the code shall be implemented as follow:

  • use CSRInstrument::GetPerimeter in order to retrieve the id of the convention
  • use a query on the Oracle table BO_PE_PERIMETER_DEF, in order to retrieve the name that corresponds to the id. Of course, a memory cache - using ITQMemoryCache for instance - is welcome if several values should be retrieved.

For instance, the following code retrieves the value:

long _perimeterId = _instrument->GetPerimeter();
if(_perimeterId!=0)
{
 m_accConventions->SetValue(&_perimeterId);
 m_valueAccessor.SetRowId(-1); // reset the result of the precedent search
 m_valueAccessor.SetType(itq::memorycache::IITQAccessor::evtNull); // let the cache input the type
 if(m_cacheConventions->GetItem(m_indexConventions,m_keyConventions,&m_valueAccessor))
 {
  char _name[41]; // 40 car. max in database (bo_pe_perimeter_def)
  int _size = sizeof(_name);
  if(m_valueAccessor.GetStringValue(_name,&_size)) // a right code should increase the value...
   _record.m_convention = _name;
 }
}

 

 
New Post 9/25/2008 12:44 PM
  Philippe Bonneau
254 posts
www.ebsys.fr
1st Level Poster


Re: How to get the convention? 

Concerning the performance, using GetPerimeter does not generate a query  on database.

 
Previous Previous
 
Next Next
  Forum  Development  Instruments  How to get the convention?
 Syndicate  

Copyright 2007-2008 by Ebsys  | Terms Of Use | Privacy Statement  | Skin by Speerio