1. Don Olliver
  2. SnapObjects
  3. Friday, 27 September 2019 17:50 PM UTC

My understanding of the DynamicModel structure is that it is a way to generate a dynamic datastore from SQL, similar to executing these statements:

new_syntax = SQLCA.SyntaxFromSQL(new_sql, 'Style(Type=Form)', error_syntaxfromSQL)

dw_new.Create(new_syntax, error_create)

We have an implementation use for this structure. However, the 30-column restriction will prevent us taking advantage of it as most of our SQL SELECTs have far more columns.

  1. Why is there a restriction?
  2. Are there plans to expand the maximum number of columns in a future release?

 

Regards,

Don Olliver

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 27 September 2019 18:57 PM UTC
  2. SnapObjects
  3. # 1

Hi Don;

  Where did you read about a column number of 30 restriction?

Regards ... Chris

Comment
  1. Don Olliver
  2. Friday, 27 September 2019 21:59 PM UTC
Hi Chris,



Remarks at the bottom of this page state that DynamicModel supports up to 30 columns.



https://docs.appeon.com/appeon_online_help/powerbuilder/api_reference/SnapObjects.Data/DynamicModel/DynamicModel.html?q=DynamicModel\



Don
  1. Helpful
  1. Michael Kramer
  2. Sunday, 29 September 2019 13:18 PM UTC
Documented max 1000 columns per DW object in native PB. I have yet to see real-world app hit that limit.

REF > PowerBuilder Help > Users Guide > Working with DataWindows > Defining DataWindow Objects > Building a DataWindow object.

There is a callout on top of that help page for number of columns.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 30 September 2019 14:13 PM UTC
Hi Don;



Ahhhh .... Snap vs PB. I was thinking native PB.



Yes, Snap (aka C#) has that limitation whereas PB's limitation is like 1,024.



Regards ... Chris
  1. Helpful
There are no comments made yet.
Julie Jiang @Appeon Accepted Answer Pending Moderation
  1. Sunday, 29 September 2019 05:55 AM UTC
  2. SnapObjects
  3. # 2

Hi Don,

In fact you can create DynamicModels with more than 30 columns. The 30-column restriction mentioned in the API Reference is a recommendation for best performance.  The thing is, we have internally defined the handling of DynamicModel with 1~30 columns.  If there are more columns, the product will internally use one more Dynamic model to handle the additional columns. You need not do special coding, it is just that the performance may be affected.

Note that in the 2019 GA release, you cannot use DynamicModel to generate dynamical datastore yet.  We will add support of dynamically creating datastore in the coming R2 version.  Please see the sample syntax that will be supported in 2019 R2 and let us know if you have further question.

//Sample 1,creating a DynamicModel datastore

string dwtext = ''  ''; //assign the dw syntax to dwtext

var dataobject = DataObject.Create(dwtext);

var ds0 = new DataStore(dataobject, _context);

//Sample 2, dynamically creating a datastore model

string dwtext = ''  ''; //assign the dw syntax to dwtext

var dataobject = DataObject.Create(dwtext);

var ds0 = new DataStore(dataobject, _context);

 

Best regards, Julie

Comment
  1. Julie Jiang @Appeon
  2. Wednesday, 2 October 2019 10:00 AM UTC
Hi Don,



After more discussion in house, we will remove the 30 column restriction from the document. It is not valid to put a number restriction there. As for how much will the performance be reduced by such increase, I need double check with the responsible engineer, who is currently on vacation. Please kindly wait for a few more days on this.

No... I do not think visual datawindow properties are supported.



Best regards, Julie
  1. Helpful
  1. Don Olliver
  2. Wednesday, 2 October 2019 14:14 PM UTC
Hi Julie,



That is great news regarding your decision to remove the 30-column limit! Please pass along your engineer's comments on performance.



On support for datawindow visual properties, We are particularly concerned about column output formatting. Our software allows clients to create and customize what we call merge datasources. In essence, they are datawindow syntax stored in the database. Clients associate a datasource with a document that has merge fields. When the datasource is retrieved, we merge data values (with output formatting) into the document.



We plan on using DynamicModel structures to retrieve the datasource. If column formatting is not supported, can you suggest alternate methods for accessing column output formats in a .NET Datastore, whether the dataobject is exported from PB Classic or stored in a database table?



Regards,



Don Olliver
  1. Helpful
  1. Logan Liu @Appeon
  2. Wednesday, 9 October 2019 05:39 AM UTC
Hi Don,

Thank you for reporting this issue. We will remove this incorrect remark (limited to 30 columns) from the API documentation, since it’s just inner detail that users don’t need to care about. You can ignore the tiny performance difference when the number of columns is increasing from 30 to 31.



For your question about column formatting, please report an enhancement requirement in the Appeon Standard Support at https://www.appeon.com/standardsupport/. It will be better if you can provide a code sample about column output formatting.



Regards,

Logan
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.