When you access a database through the ODBC interface and define a DataWindow object that uses a stored procedure as its data source, PBUseProcOwner specifies whether PocketBuilder should qualify the stored procedure with the owner name in the SQL EXECUTE statement passed to the driver.
PocketBuilder qualifies the stored procedure with an owner only if the owner associated with the stored procedure is different from the ID of the current user (the developer building the DataWindow object or the user running the application containing the DataWindow object).
ODBC
PBUseProcOwner = ‘value’
PBUseProcOwner = ‘No’
PocketBuilder searches the following in this order to determine the PBUseProcOwner value:
The section for your database profile in the PocketBuilder initialization file in the development environment, or the value of the Transaction object DBParm property in a PocketBuilder application.
The section for your ODBC driver in the pkodb25 initialization file.
If PocketBuilder does not find a PBUseProcOwner value in these locations, it defaults to a value of No.
DBA (database administrator) is a reserved word in SQL Anywhere syntax. If you define a DataWindow object with a SQL Anywhere stored procedure as its data source and DBA owns the stored procedure, the painter passes the following SQL EXECUTE statement to the ODBC driver if PBUseProcOwner is set to Yes:
EXECUTE DBA.MYPROCEDURE
This statement generates a syntax error because it includes the DBA reserved word.
If DBA owns the SQL Anywhere stored procedure you are using, you can avoid this syntax error by setting PBUseProcOwner to No so that PocketBuilder does not qualify the stored procedure with DBA.
In some situations, however, you must qualify the stored procedure with the DBA owner. For example, the DBA might want to grant execute permission to another user ID. In this case, you can avoid errors by editing the SQL EXECUTE syntax to enclose DBA in quotes, like this:
EXECUTE "DBA".MYPROCEDURE
To specify that PocketBuilder should qualify the stored procedure with its owner name in the SQL EXECUTE statement: