Thanks for your responses, still I am facing the issue that my calls to of_GetRegistry are not being successful, and in my registry I have the values.
and here below is my code where I am expecting the data being read from the registry:
STRING ls_Section, ls_AppName
BOOLEAN lb_Loop = TRUE
SetPointer(HourGlass!)
THIS.of_MicroHelp('Connecting to database')
ls_Section = 'Connection'
THIS.of_GetRegistry(ls_Section, "dbms", sqlca.dbms)
THIS.of_GetRegistry(ls_Section, "database", sqlca.database)
THIS.of_GetRegistry(ls_Section, "servername", sqlca.servername)
THIS.of_GetRegistry(ls_Section, "dbparm", sqlca.dbparm)
THIS.of_GetRegistry(ls_Section, "impdirec", gnv_app.impdirec)
THIS.of_GetRegistry(ls_Section, "incodirec", gnv_app.incodirec)
THIS.of_GetRegistry(ls_Section, "procdirec", gnv_app.procdirec)
// Set application name for connection
// Get dbparm from registry, like everything else
// sqlca.dbparm = "AppName='" + THIS.is_AppName + "'"
// Set transaction object
THIS.itr_Sql = SQLCA
// Check parameters
IF sqlca.dbms = "" THEN
IF THIS.of_SetConParm() = -1 THEN RETURN -1
END IF
DO WHILE TRUE
IF THIS.of_Logon() = -1 THEN RETURN -1
THIS.of_SetRegistry(ls_Section, "dbms", sqlca.dbms)
THIS.of_SetRegistry(ls_Section, "database", sqlca.database)
THIS.of_SetRegistry(ls_Section, "servername", sqlca.servername)
THIS.of_SetRegistry(ls_Section, "dbparm", sqlca.dbparm)
THIS.of_SetRegistry(ls_Section, "impdirec", gnv_app.impdirec)
THIS.of_SetRegistry(ls_Section, "incodirec", gnv_app.incodirec)
THIS.of_SetRegistry(ls_Section, "procdirec", gnv_app.procdirec)
SQLCA.AutoCommit = TRUE
SetPointer(HourGlass!)
CONNECT;
IF sqlca.sqlcode <> 0 THEN
THIS.of_MicroHelp('Connection failed')
THIS.of_SqlError('Login failed',SQLCA)
ELSE
THIS.of_MicroHelp('Connected')
RETURN 1
END IF
LOOP
// Logon failed, return error
RETURN -1
My question is why is not reading my values from the registry ?
Point 1. - The Registry has a 32 bit and a 64 bit side. Data stored on the 64 bit side is not available to 32 but PB Apps. Also vise versa, 32 bit registry entries are not available to 64 bit Apps.... This is not the case because my key is "HKEY_LOCAL_MACHINE\SOFTWARE\Receiver\Irs_mgr\Connection]" and here we can see that according this path then belongs to the shared section for both 32 and 64 bits.