Hello,
I'm a rookie of this forum.
My name is Giovanni Di Chiara and I write from Italy.
I don't know if my problem has already been detected before.
I'm tried to use the library InstantSQL for connecting to a MS SQL server via ODBC driver. I use RMCobol for Windows.
My Windows is a Windows 10 Pro.
When I connect to databasesource and I pass ID and Password wrong, before of error return code on my program, it is opened in automatic there is a Error Messagebox of SQL server and then it opened the Connection SQL Server Dialog Box.
It is prossible to disable the "SQL Message Box" and the "Connection SQL Server Dialog".
My program is a service the run on background with no User Interface, the errors I'd like to manage into my program.
My source code:
"
display "USERDB " userDB.
display "PASSWORDDB " passwordDB.
MOVE NOME-DB TO sql-DataSourceName.
IF userDB > SPACE
SQL CONNECT DATASOURCE
sql-ConnectionHandle,
sql-DataSourceName,
userDB,
passwordDB,
TIMEOUT-MAX-DB
display "con user e password"
display "loginTimeOut " TIMEOUT-MAX-DB
ELSE
SQL CONNECT DATASOURCE
sql-ConnectionHandle,
sql-DataSourceName
END-IF.
IF sql-OK
MOVE sql-ConnectionHandle TO FRIGO-ConnectionHandle
MOVE 1 TO CONNESSO-DB
CALL WOWSETPROP USING WIN-RETURN
TX-STATCON
"Text"
"connessione OK"
ELSE
DISPLAY "connessione sql-Return " sql-Return
CALL WOWSETPROP USING WIN-RETURN
TX-STATCON
"Text"
"connessione fallita"
SQL DESCRIBE ERROR
sql-Error-Description
display "errore " sql-Error-Description
END-IF.
"
I attached any pictures.
Thank you for help.