- Brad Howie
- PowerBuilder
- Wednesday, 10 March 2021 12:49 AM UTC
I support a mature application using PowerBuilder 2017 R3 and SQL Server via ADO.Net.
Our user community recently requested we add signatures onto some of our datawindow documents. The 'tableblob' datawindow object seems perfect for this, but unfortunately it doesn't seem to work when MultipleActiveResultSets=FALSE in the database connection ProviderString. Our application requires MultipleActiveResultSets=FALSE, so I'm not sure how to get around this. The error I receive from the datawindow preview painter is:
"There is already an open DataReader associated with this Command which must be closed first".
Running a database trace against the datawindow retrieval shows that this error occurs after the initial datawindow data is retrieved, when it is trying to retrieve the tableblob blob data from the database.
If I set MultipleActiveResultSets=TRUE, everything works perfectly - the datawindow displays the blob image stored in the database as expected. Unfortunately, this is not an option.
I also noticed that the 'PrintDataWindow' function will crash when trying to print the datawindow with the tableblob - we have a few areas in the application where this function is used. This is unrelated to the MARS issue.
Is there a workaround that will allow me to display the blob image on the datawindow, when MultipleActiveResultSets=FALSE ? I'd prefer not to change database drivers, if possible. Using files is also not an option, we need to have the images/signatures stored in the database.
Thanks,
Brad
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.