Social control theory. In criminology, social control theory proposes that exploiting the process of socialization and social learning builds self-control and reduces the inclination to indulge in behavior recognized as antisocial.
A simple call to the close() method will do the job. If you close the Connection object first, it will close the PreparedStatement object as well. However, you should always explicitly close the PreparedStatement object to ensure proper cleanup. For a better understanding, let us study Prepare-Example Code.
BOOL CloseHandle( HANDLE hObject // handle to object to close ); Parameters hObject Handle to an open object. Return Values. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Remarks. The CloseHandle function closes handles to the following objects: CloseHandle invalidates the specified object handle, decrements the object's handle count, and performs object retention checks. After the last handle to an object is closed, the object is removed from the system.