T
tbergman
Guest
My real world use for this, aside from writing fun demos, is to create a SQL server table from a Progress temp-table, then use this SQL table from Excel for report generation. After trying many techniques for the actual writing of the data, I found that the fastest method, by a large margin, was to generate a .p file on the fly with the basic FOR EACH and assignment statements and then run the newly generated .p. This technique was partly necessitated by the need to massage some Progress data types before they go into SQL.. For example, we need to apply formatting to some character fields. By overloading the format and/or column-format attribute of the TT field, the program can know to use a format rather than the raw data value. BLOB fields need to be converted to Byte Arrays before they go into SQL etc. The massaging logic gets written to the generated .p. I believe the presentation you downloaded also contains a file named sqldb.p. This program demonstrates the creation of a MSSQL database and tables, then the filling of the data using a .Net dataset and then the System.Data.SqlClient.SqlBulkCopy class. This is probably the fastest way to get data into an MSSQL database but does not offer that same ability to alter the data prior to sending as other techniques.
Continue reading...
Continue reading...