Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
CSIDE and OScript
Database connection without user login
Chris_Bowman_(spawaruser1_-_(deleted))
Customer has given requirements for a module that allows users to register for a workshop. There are two scenarios we have to take into account for the attendees:1. Attendees with a Livelink account - information is pulled from the Livelink DB2. Attendees without a Livelink account - information must be entered and stored in module tablesHow do I establish a connection to the database for the attendees that do not have an account in Livelink. I have one idea of using the following:String cnctName = $Kernel.SystemPreferences.GetPrefGeneral( 'DftConnection' )//we have a user account we use for other purposes similar to this, if I enven need to specify a user with this functionprgAssoc = $LLIApi.PrgSession.CreateNewNamed( cnctName, { databaseUser, databaseUserPwd } )if !prgAssoc.OK .fError = prgAssoc.ErrMsgelse .SetPrgSession( prgAssoc.pSession )endprgCtx = .PrgSession()connection = prgCtx.fDbConnect.fConnectionIn the RH for attendees connecting w/o an account the following objects are not present (my intent here is to make a copy of these objects):1. SetPrgSession()2. PrgSession()3. fPrgCtxWill this approach work the way I am describing?If not, does anyone know of another method to accomplish the same?Is there anything I am overlooking with this approach?Thanks,Chris
Find more posts tagged with
Comments
There are no comments yet