Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: PowerBuilder
Expertise: Beginner
Apr 23, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

How to load data into datawindow's external data source data sets

When using an external data source for a datawindow, how can I load the data into the sets of data I have created?

External datawindows are a great hidden treasure in PowerBuilder. I use them for all my screens and never use the simple raw controls (except commandbutton).

The answer to your question depends on your application of the external control. For example, if I were creating some retrieval arguments for a selection list, I would use InsertRow() and then set any precalculated or preferred values.

If you are creating large datasets, the fastest way is to use the Import Data commands such as ImportString, which allows you to build up a dataset in string format with the columns tab-delimited and the rows linefeed-delimited.

One word of caution: Don't let the strings get too large, because on 16-bit systems there is a string size limit of 60k. I suggest using a commit-type approach in which you build up your string in a loop. If the string grows larger than a certain size, call ImportString and reset the string. Continue until all the data is processed.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date