Hi Rajkumar ;
Yes, this is absolutely possible. In fact, I just created a Test Case in the new PB 2022 R2 beta (just for fun)! ;-)
Both PC and PS Apps have a different architecture - so you need to think outside of the box a bit. Both PC & PS deployments send your PBLs to the Web Server as Folders and compressed PB Classes as ZIP files. Here is my LibraryImport Test Case deployment ...
WorkSpace
IIS
PC App Executing ...
Trick #1 --- you need a blank PBL that is not in the Apps library list
Trick #2 - Deploy the PBL and the DWO syntax as external files in the PC/PS App project
Trick #3 - At runtime, add the "real" PBL to your PC/PS App's library list
Long ll_bytes
ll_bytes = AddToLibraryList ( "library_import2.pbl" )
Trick #4 - dynamically add the DWO source to the dynamic PBL
String ls_dw_source
String ls_errors
Int li_rc
Int li_filenum
Long ll_bytes
li_FileNum = FileOpen ("dw_Library_Import.txt", TextMode! )
ll_bytes = FileReadEx ( li_filenum, ls_dw_source )
MessageBox (" DWO Read", String ( ll_bytes ) )
li_rc = LibraryImport ( "Library_Import2.pbl", "dw_Library_Import", ImportDataWindow!, ls_dw_source, ls_errors, "L.I. test" )
MessageBox (" Library Import", String ( li_rc ) )
dc_data.dataobject = "dw_Library_Import"
dc_data.SetTransObject ( SQLCA)
dc_Data.Retrieve ( )
- After the DWO source is read, the LibraryImport can now be done in the 2nd "real" PBL.
- Once that 2nd PBL has the DWO, you can then assign the DWO to the DC. This works as the LibraryImport has worked.
- Now you can assign SQLCA to the DC and the DWO can be located in the secondary PBL which is now in the library list.
- Then you can perform any Retrieve, Update, Sort, Filter, etc commands against the DC as we have a real DWO in play. :-)
So the PC/PS app now works great with the LibraryImport command if you follow my approach! (Chris's weird way of doing things with PB - LOL!)
HTH
Regards ... Chris
I haven't tested the Setlibrarylist command yet but, I think it should work with both PC & PS Apps. The AddToLibraryList() works for PS App's as well as PS uses PC for the App delivery & execution. ;-)
Regards ... Chris