Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

19. Working with Data in AIR > 19.3. Create an In-Memory Database

19.3. Create an In-Memory Database

Problem

You need to create an in-memory database without creating a local file.

Solution

Set the reference parameter of the open() and openAsync() methods to null to create an in-memory database.

Discussion

For a desktop application, it is often useful to be able to manage the data structurally by using a powerful language such as SQL, without having to save the data locally.

You can create an in-memory database by passing a null value to the reference parameter of either the synchronous open() method or the asynchronous openAsync() method. The temporary database will exist while your application is open, but it is not saved to disk; instead, it’s deleted when your application closes.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint