Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Using ormlite with a preopulated database
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Tim Drew  
View profile   Translate to Translated (View Original)
 More options May 25 2012, 12:40 pm
From: Tim Drew <timothydd...@gmail.com>
Date: Fri, 25 May 2012 09:40:33 -0700 (PDT)
Local: Fri, May 25 2012 12:40 pm
Subject: Using ormlite with a preopulated database

Hi all,

First of all ormlite is awesome, big thanks, it makes android development
sooo much easier.

The issue I'm having is that I would like to use a small prepopulated
database file with ormlite but haven't been able to get it to work.

Upon first run of an app I'm copying an existing database from my apk
assets folder to the location where ormlite would usually create its fresh
database. I was hoping ormlite would just pick it up an run with it but
unfortunately I'm still getting onCreate() firing in my SQLiteOpenHelper.

I'm pretty sure that the copied database's compatibility/integrity is
intact as it is one that ormlite created in the first place, I just copied
it off an emulator via DDMS and haven't made any changes.

Is there anything ormlite specific that I might have missed?

Cheers,
Tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jc  
View profile   Translate to Translated (View Original)
 More options May 25 2012, 8:29 pm
From: jc <jroma...@gmail.com>
Date: Fri, 25 May 2012 17:29:37 -0700 (PDT)
Local: Fri, May 25 2012 8:29 pm
Subject: Re: Using ormlite with a preopulated database
 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Drew  
View profile  
 More options May 28 2012, 5:58 am
From: Tim Drew <timothydd...@gmail.com>
Date: Mon, 28 May 2012 02:58:08 -0700 (PDT)
Local: Mon, May 28 2012 5:58 am
Subject: Re: Using ormlite with a preopulated database

Brilliant,

Got it working now, my own implementation was pretty much there, looks like
I just needed to do a  

getWritableDatabase().close(); before performing the copy.

Much appreciated.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »