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 ?
Getting setting registry is secondary step.