Tuesday, December 02, 2008

Some issues with PBTrace

One of the new features added beginning with PowerBuilder 10.2 was the ability to toggle database tracing on and off by setting the PBTrace parameter to either 0 or 1 in the DBParm attribute of the transaction object.

Techno-kitten.com reference



You'll note, however, that the samples in the online help only show the PBTrace parameter as the only parameter for DBParm. There are times, particularly if you're connecting to and ODBC datasource (where the DBParm includes the connect string) where you need to have other parameters.

Well, unfortunately, I've recently discovered that, depending on the version of PowerBuilder in use and where you put the parameter in the attribute, you get varying results as follows:

PB 10.5
Only attribute: works fine.
At beginning of DBParm: tracing is done, but not toggled (value of PBTrace is ignored).
After beginning of DBParm: no tracing is done at all

PB 11.0
Only attribute: works fine.
At beginning of DBParm: no tracing is done at all
After beginning of DBParm: no tracing is done at all

PB 11.5
Only attribute: works fine
At beginning of DBParm: works fine
After beginning of DBParm: works fine

So, if you've migrated to 11.5, you're set. But if you're on 10.2 through 11.2, you should be aware of the limitations of the implementation.

No comments: