Smart Business Object - Help!

Ashley Tyler

New Member
Could somebody please explain to me how the Smart Business Object should be used over the AppServer. I am running 9.1B and the SBO works great when a connection to the database is present, but when I try to run using appserver it will not run.

The SBO has two SDO one for holding document details and the other hold a list of tags linked to a particular document. I am just trying to setQueryWhere in the document info to return a specific list.

Should the SDO's have an AppServer partition or should setting the SBO partition automatically default to using the AS versions of the SDO's.

Any help in this matter will help tremendously as I can see a great benefit in using the SBO's, allowing me to tailor standard SDO functions and procedures through new code in the SBO.

Any other comments in the use of SBO would be greatly appreciated. Thanks in advance.

Ashley Tyler:chat:
 

Stefan De Leyn

New Member
Ashley,


You can not use the "setQueryWhere"-function with an SBO.
In stead go through the following steps:
1) DYNAMIC-FUNCTION('resetQuery':U IN h_SBO,
INPUT " ":u /* String representing the name of the SDO in the SBO that you wish to Query*/).

--> This will reset any previous Queries inputted through the function in step 2. (Usefull if you need the user needs to be able to change the query.

2) DYNAMIC-FUNCTION('addQueryWhere':U IN h_SBO,
INPUT pcWhere /* as with setQueryWhere */,
INPUT " ":u /* SDO-name again */,
INPUT "And":u /* To instruct Progress that this pcWhere-clause needs to be an AND-operator to the existing one, "OR" is the second possibilty*/).

3)DYNAMIC-FUNCTION('openQuery':U IN h_SBO). /* Same as with SDO-object*/


This is the way I recently used the SBO and is working fine.
Hopefully this gets you out of trouble.
I have also attached a file which should give you an idea of some of the functionalities on SBO's. I am still exploring myself but all this should get you going in the right direction.
 
Top