PowerBuilder & MySQL Problem: Tips & Tricks

For a months, I’ve been included to join a latest research on a team about an application written from PowerBuilder & MySQL. After struggling hard with it, so many incompatibility found through out PowerBuilder 7 within MySQL 5 backend connection. I don’t have any idea why it’s happened since I though they both is a robust already application. I’d choose MySQL 5 since it has sub query features enabled whether than previous version which it so helping us a big hand to make a high-level query. I’ll describe some of the problems we had face:

1. Error Resulted with Select Sum, Count, Max or Min Query
At first, we’re confused with this since the query resulted an error. However, this could be solved by adding an option=135168 in dbparm string connection.

ConnectString(e.g.,sqlca.dbparm="ConnectString='DSN=mysql;UID=root;PWD=123456;OPTION=135168',PBUseProcOwner="NO"")

2. Error Resulted in Query Select Where on DataWindow
Filtering record with select where query resulting truncated selected row (ODBC error no.#01004).



This also weird things happened around since we didn’t playing with string truncation except just a plain simple query. The answer is simply to turn on the Disabled Bind option check box in Database Profile Setup



3. Very Uncomfortable Development Environment – In My Opinion
Again – in my opinion – the RAD environment of PowerBuilder to modifying the database are too difficult. There are no MySQL front-end application better than MySQLFront. The PowerBuilder it self concept are persistent to define the final tables before it start to proceed the development process. Once you make a mistake to define the length of a field, you have to rebuild the table from PowerBuilder & then re-compile the program. Very weird – In my opinion… as I said before.

4. Fault on Numeric Type Data in PowerBuilder (Very Significant Problem!)
A crucial matter happened when having a row transaction with decimal or numeric data type. A decimal data type which exist in MySQL wouldn’t recognized properly from PowerBuilder since it will display an empty string on Data Type column in Database Connection window. And so on eventually happened also in numeric data type.

Define data type from MySQLFront


View data type from PowerBuilder


However, as we have much troubles & complicated within it, we temporary solved to downgrade the MySQL into version 4 as the quick trick. The potential problem as described as no #4 above are suddenly lost. Now, we are waiting for any future severe that we don’t hope actually. We just only need a grips of lucky strike…

Labels: ,

  Post a Comment