Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8556261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:18:25+00:00 2026-06-11T15:18:25+00:00

I use a database in ormlite. I would like to get the version of

  • 0

I use a database in ormlite. I would like to get the version of my database in the Activity, but I don’t know in wich table is saving the version.

Anybody know how can I get the version of the database? I have looked for in the manuals but I haven’t found it.

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T15:18:27+00:00Added an answer on June 11, 2026 at 3:18 pm

    If you are talking about the database version number managed by the Android OS then you will know what the number is because otherwise you will get a call to onUpgrade(...).

    If your onUpgrade(...) method is called, you know what the number is because you get the old version and the new version numbers. If you didn’t get the call then you know that the version number you set in your database helper and was passed up to the SQLiteOpenHelper class corresponds to the one in the Android’s storage.

    Here’s a sample of code from a typical ORMLite DatabaseHelper class:

    private static final int DATABASE_VERSION = 4;
    ...
    
    public DatabaseHelper(Context context) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION, R.raw.ormlite_config);
    }
    ...
    
    /**
     * This is called when your application is upgraded and it has a higher version 
     * number. This allows you to adjust the various data to match the new version
     * number.
     */
    @Override
    public void onUpgrade(SQLiteDatabase db, ConnectionSource connectionSource,
        int oldVersion, int newVersion) {
        ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Show Database Use database show tables Describe <table> All good and well, but is
I want to use Access database with query for pivot table in Excel. How
I'd like to use object database to persist some classes created in IronPython. The
Proviso: I don't want to use a database for the following, please. I'm getting
What is the simplest way to use database persistence in Java? I know, many
ATM I am trying to learn how to efficiently use database inidices and would
currently we are developing an app in which we use database table to store
I used to use mysql, and in mysql database hold tables, but these concepts
Possible Duplicate: What to do when I want to use database constraints but only
We're currently using a PostgreSQL database and OrmLite. We now have a use case

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.