No error thrown when trying a SELECT on a corrupted database

Dave Addey listmail1 at dsl.pipex.com
Mon Jun 11 13:36:04 CDT 2007


Hi there,

I¹ve been seeing this problem with v2.5.10, and also with v3.0.2, in V4RB.
Here¹s the problem...

I am opening and testing my database file before using it, to make sure that
it is a valid database, and has not become corrupted.  The idea is that
Valentina should throw an exception if the database is not valid, and I can
then catch this exception and create a new blank database.

However, I am finding that the code below:

      Dim DBRec as VCursor

      DBrec = outDatabase.SQLSelect("SELECT * FROM Tracks ORDER BY Title,
ArtistNoThe, Album, TrackNumber", EVCursorLocation.kServerSide,
EVLockType.kNoLocks, EVCursorDirection.kRandom)

...just ³hangs² when trying to access a corrupted database, rather than
throwing an exception.  In earlier versions of V4RB 2.5.x, this line would
throw an exception.  The database is opening without any problems.

Any ideas about how I can get this code to throw an exception correctly?

I¹m using REALbasic 2007r2 UB on an Intel Mac Pro.

Dave.


More information about the Valentina mailing list