SQLite: how to open existing database in memory

Peter Haworth pete at lcsql.com
Sat Oct 17 12:55:07 EDT 2015


No, no name is available because you have to use ":memory" as the name to
indicate it is an in-memory db.

Maybe if you explain what it is you're trying to achieve, we can help more.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Sat, Oct 17, 2015 at 9:42 AM, Glen Bojsza <gbojsza at gmail.com> wrote:

> Thanks for the clarification...this changes the direction I need to take.
>
> In creating an in memory database can you create one with a name?
>
>
> On Sat, Oct 17, 2015 at 12:25 PM, Peter Haworth <pete at lcsql.com> wrote:
>
> > Sorry, I should have looked at your syntax more closely.
> >
> > You can't open an existing database as an in memory database.  If you
> want
> > to open an in memory database, the revopendatabase syntax is
> > revOpenDatabase("sqlite",":memory:") and it will be a brand new, empty
> > database with no tables.  The syntax you used would have created a disk
> > database file named /Users/Dev/Documents/Ratings.db3:memory: with no
> tables
> > in it, hence the error message you got.
> >
> > Hope that explains it better.
> >
> >
> >
> > Pete
> > lcSQL Software <http://www.lcsql.com>
> > Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> > SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> >
> >
> _______________________________________________
> 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
>



More information about the use-livecode mailing list