PowerBuilder ‘Gotcha’ – Quoted Identifiers

Posted on Tuesday, September 21st, 2010 at 8:20 pm in

Be careful when developing against any database which supports quoted identifiers (I know, who doesn’t)? Anyway it is real easy to forget and ‘turn off’ this option on your local db (or your development connection) and end up releasing a bug by a simple SQL alteration like this:

--Original SQL
SELECT 
partNo
, partDesc
FROM PartMaster 
WHERE categoryKey = :al_catkey
--Modified SQL
SELECT 
partNo
, partDesc
FROM PartMaster 
WHERE categoryKey = :al_catkey
AND partStatus = "A"

This works fine with quoted identifiers off but will generate an error when run on your customer’s database where this option is turned on (which is the default for many installations).

Top