If you are going to connect to a local database you can use CONNECT RESET SQL statement, but if you want to connect to another database/machine, you can connect to the desired machine by replacing the RESET parameter with the name of the remote database.
You don't actually need the CONNECT RESET if you are embedding in RPGLE.
ReplyDelete...because if you use the CONNECT RESET, and you get a successful connection, you are going to close all open cursors, destroy all prepared statements and release all locks from the current connection. Do you want that?
ReplyDeleteIf you are going to use SQLRPG, you need to execute CONNECT RESET at the start of your program. And I think embedded SQL is considered as job level, so it won't affect any other jobs.
ReplyDeleteplease site a sample code...tnx!
ReplyDeletewhat is the difference if I do the RESET or not?