revOpenDatabase Problem

Pete pete at mollysrevenge.com
Mon Dec 26 17:00:44 EST 2011


I think that's probably true.  I'm trying to figure out how to to tell if a
real sqlite database was opened.  The first access to the db fails but the
error is "Undefined SQLite error" which is not very specific!

This is in an app where the user can select an sqlite db so I'm at the
mercy of what they choose.  I did think about filtering the valid
extensions for the ask file dialog but it's my understanding that an sqlite
db can have any extension.  I also tried calling revDatabaseType  but that
returns "SQLITE" even if it's not an sqlite database.

Pete

On Mon, Dec 26, 2011 at 1:42 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> My guess is that it doesn't check for a valid schema/format but that it is
> only establishing a file handle which is successful. Then it should fail
> with an error on actual attempt to use.
>
> On Mon, Dec 26, 2011 at 2:33 PM, Pete <pete at mollysrevenge.com> wrote:
>
> > Using revOpenDatabase to open an sqlite database using a file that is not
> > an sqlite database return an integer as if the database was successfully
> > opened.  Any subsequent db accesses fail of course but I wonder why
> > revOpenDatabase doesn't return an error?
> >
> >
> > --
> > Pete
> > Molly's Revenge <http://www.mollysrevenge.com>
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>


-- 
Pete
Molly's Revenge <http://www.mollysrevenge.com>



More information about the use-livecode mailing list