A couple of other things. Postgres, and maybe MySQL, allow presistent connections. This mean the backend will never timeout and disconnect a user, no matter how long a connection goes without any activity. Therefore, you should probably issue a SQLDISCONNECT(oAC.DataSource) somewhere during cleanup and return. The oAC.DataSource hold the connection handle which is numeric.
Also, I checked and I placed one of the [clear events] in a the menu procedure labeled [Exit App]. This make more sence than having it in the destroy event of the [Exit button] of the form.
Glad I could help.