I have written an ASP.net app that needs to obtain a BO user object. It is all working but there is a 30 second delay whilst populating the InfoObject with the results. i think this is due to the fact I am currently using a Select All statement which I probably don’t need to do. This is being run on BO XI 3.1.
I am populating the User (CrystalDecisions.Enterprise.Desktop.User) object using the results from this InfoStore Query:
SELECT *
FROM CI_SYSTEMOBJECTS
WHERE SI_KIND=‘User’
AND SI_NAME=‘UserName’
I then run the query and populate an InfoObjects object with the results:
infoObjectsUser = infoStore.Query(query);
After checking whether anything was returned and that only one record was returned I populate a single InfoObject with the first result before casting to a User object :
InfoObject infoObject = infoObjectsUser[1];
By using logging I have determined that this last line of code takes 30 seconds to run if the code hasn’t been run recently (if we run it again immediately it is almost instant as I assume something remains in memory maybe?).
I am assuming that it could be due to populating the object with every attribute returned in the query and we may be able to increase performance by only returning the fields that are required to build the user object. However I have no idea which fields are required and which are optional.
The only data I need from the User object are the groups they belong to, as well as the ability to be able to write back following any additional groups being added to the User. Which field is the main ID (SI_ID, SI_GUID, SI_CUID, SI_RUID…) ?
Any help with this would be gratefully received.
(I’ve not done much work with BO so may be overlooking something obvious)
rickp101 (BOB member since 2009-04-08)