Hi all,
I'm still trying to chase down the problem I've been having with
unexpected crashing when quitting my program (it appears to be tied
to my having used REALdatabase when I wrote it rather than the now-
prefered REALSQLdatabase). In doing so I had a question about when
you need to be calling db.close.
Here is an example (detail removed):
dbFile = GetFolderItem("myDB")
db = new REALDatabase
db.DatabaseFile = dbFile
'Check we can open up a connection to the database
if db.Connect then
// do stuff with database
db.close
else
// Couldn't connect to the database
MsgBox "Sorry, there was a problem checking your registration
details in the database."
end if
My question is, should I be calling db.close in the case where
db.connect fails? That is, do I have to call db close if I have
initialised the database object (db = new REALDatabase) even if I
haven't connected to the database? Or do I only have to call db.close
if db.connect has succeeded (i.e., as in the code above)?
Thanks,
Ian.
--
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>