Blog

At the user events I’ve presented at this season, I’ve talked about a new command which is coming: SQL/data. I said that is was coming, but it was probably coming around the time of Easter, after the December release of Uniface 9.6.04. (Hopefully Maarten said the same thing when he presented in Germany and Switzerland!) The good news is that we’ve been able to get it into the December release, so it will be in Uniface 9.6.04 after all (unless something really unforeseen happens in the next 3 weeks or so). SQL/data came about after some discussions with a few customers on their use of the SQL/print command to pull back data from the database via an SQL query rather than via the driver. The thing with SQL/print is that the statement was originally designed for the SQL workbench in the development environment, which means that it comes with the formatting to line up all of the rows and columns. What we found is that some customers were using this and then executing Uniface services to remove all the white space so only data was left. In some cases, some of these post processing services were really quite complicated and expensive in regards to server resources. Revising SQL/print was an option, but turned out to have some risks of the dreaded incompatibilities, so we looked into the idea of a new approach. SQL/data provides the ability to retrieve data without the white space, therefore removing the need for these services. Blog post2 There is a subswitch to include headers if required, which could also be very useful. Maybe there are further valuable enhancements we could consider for the future.  /struct could be interesting. (Not sure what the architects would think of it though...) SQL/data will be made available in the Oracle, MS SQL, MySQL, Solid and db2 drivers.  MS SQL also includes the new Linux version (seriously!), which will also be made available with the Uniface 9.6.04 update.

4 Comments

  1. If that works, applause is in order :)
  2. works. Thanks for the function.
  3. It would be nice to have a way to connect data coming from sql/data with the running form/dsp. What I mean is having a subswitch of sql/data able to directly move extracted data within entities and fields picted on the form/dsp. I know that limitations can be applied because many reasons like: - how to manage NonSQL DB - rowid() in an Oracle environment - calculated fields - readonly fields - etc etc... but it could be limited to fields with same name between the sql/data output and the fields/entities used into form/dsp. I think it could be a nice and welcomed complement to the functionality already implemented.
  4. I've just tried the new sql/data on oracle 10.2.0.3.0 and Uniface 9.6.05.02, and got DB error... sql/print works fine. Any ideas?