I am trying to maintain a PowerBuilder program and have no access to the previous programmer who wrote the code. I modified a DataWindow and now it generates source code that does NOT include the table owner (dbo) in the column names in selection. But it DOES include dbo in the WHERE clause. See below.
(Old source code shows dbo.FieldAuxs everywhere in selection and in the where.)
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"FieldAuxs~" )
COLUMN(NAME=~"FieldAuxs.id~")
COLUMN(NAME=~"FieldAuxs.clientid~")
COLUMN(NAME=~"FieldAuxs.status~")
COLUMN(NAME=~"FieldAuxs.historyear~")
WHERE( EXP1 =~"dbo.FieldAuxs.id~" OP =~"=~" EXP2 =~":al_id~" ) ) ARG(NAME = ~"al_id~" TYPE = number) " update="FieldAuxs" updatewhere=1 updatekeyinplace=no arguments=(("al_id", number)) )
This results in an error: Column prefix dbo.FieldAuxs does not match with a table name or alias name used in the query...
My database profile is logging me into the PowerBuilder development environment as me (not the dbo). I believe that is what I want to do.
I have read about setting my SQLCA.DBParm to SQLQualifiers=1, but I see no DBParms input area in the Database Profile Setup. It seems in some version before 12.5 you could type a DBParm value directly into some box. But in 12.5 they just have checkboxes and drop downs that set the value for DBParm. And I do not see a choice that translates into setting a value for SQLQualifiers. According to the documentation: SQLQualifiers=1 --Qualify identifiers with owner names in SQL statements.
I must not have something set up correctly that my DataWindow is auto generating source code that is fully qualifying column names ONLY in the WHERE clause and not in the Selection.
Ideas are welcome!