Assign local variable through "Code Activity"

My end result is a bit more complex than this (that is why I am doing this in a code activity), but I am trying to pull data into a string variable and then assign the results to a local variable (see below).  I have this running when a button is pressed.

 

string FunctionList = SelectSql(new MetastormDefault(), "Select rtrim(f_id), rtrim(sy_code), rtrim(s_code), rtrim(f_desc), s_route, s_nbr, p_flag,s_type from vw_map where rtrim(F_ID) = 'XYZ' and (A_CODE+' - '+A_Desc) = 'X - YZ'").ToString();

 

Local.listoption = FunctionList.ToString(); 

 

When I click the button, these are the results that are returned:

Metastorm.Runtime.Core.DataContainer

 

I am not sure I understand why this is happening or what that "Error" is referring to.

 

Thanks,

Harry

 

Tagged:

Comments

  • This issue is with you using ToString() at the end.  This is returning the full name of the datatype not a string representation of the value. Since, SelectSQL() can be used in many situations, it returns a type of "Metastorm.Runtime.Core.DataContainer".  To return a Text representation, you should be able to use SelectSQL().Text.  Similarly, you could use SelectSQL().Memo, SelectSQL().Real, etc.

  • Is there some documentation about full .net metastorm api? I want such detailed description like format of return data. Last time we were very surrprised that .memo return text with new line as separation string. Is any documentation describing such "features"?

  • Yes, PLEASE. Some documentation would be nice

  • I have to agree. It would also be nice to know to what level it is supported. I see a lot of messing around with underlying .Net objects such as DataSets, for example (some presented by Metatsorm). Can we rely on this remaining the same, or will we need to rewrite any code relying on these undocumented structures if somebode decides to change the way they work.

     

    It is a great risk for the future for all of us, and the cost could be enormous if we do not know now.