Hi,
The first line of code uses the provider method, which gets the existing transformation object by searching for matching data record in the DB, the second one is TransformationInfo constructor, which accepts DataRow with TransformationInfo object data already obtained from the DB (e.g. by custom query). It accepts only the DataRow matching the CMS_Transformation DB table structure, so it cannot be used to actually perform transformation of your Page (document) data into resulting output.
Is that what you were trying to achieve?
It's not possible to transform a custom DataRow in ASCX transformation directly, only through a Repeater (listing) control. Another alternative is to use Text/XML transformation and transform your data in the macro expression utilizing the ApplyTransformation method.
Both these options are discussed in our forum thread.
Hope this will be helpful.
Should you need any additional details, please feel free to ask.
Regards,
Zdenek.