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

  • SEARCH
  • Home
  • 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 9070291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:38:58+00:00 2026-06-16T17:38:58+00:00

SQLiteDatabase db = this.getReadableDatabase(); Cursor mCursor =db.query(TABLE_ACCOUNTS, new String[]{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}, null,null, null, null, null); My

  • 0
SQLiteDatabase db = this.getReadableDatabase();
Cursor mCursor =db.query(TABLE_ACCOUNTS, new String[]{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}, null,null, null, null, null);

My question is:
Will this initialization allow to return ALL values in the db database & table?

As far as my project, it appears to only be returning NULL values. (No Error)
a = null,b = null,c = null

Detected some actual values when i manipulated with the 3rd parameter with a+”=?” and variations (which is now null).

Or could the prevention of actual values be something else? (assuming Adding Data to the DB works)

(Adding code)

public void addAccount() {
        SQLiteDatabase db = this.getWritableDatabase();
     Account account = new Account();
        ContentValues values = new ContentValues();
        values.put(id, account.getA()); // Contact Name
        values.put(a, account.getA()); // Contact Phone Number
        values.put(b, account.getB()); // Contact Phone Number
        values.put(c, account.getC());
...

        db.insert(TABLE_ACCOUNTS, null, values);
        db.close(); // Closing database connection

    }

(Cursor code)

 if ( (mCursor != null && mCursor.moveToFirst()) ) {

            do {
                stringResult1 = 
                        "a: "+ mCursor.getString(0)+ "\n"
                     + "b: " + mCursor.getString(1) + "\n"
                     + "c: " + mCursor.getString(2) + "\n"
                     + "d: " + mCursor.getString(3) + "\n"
                     + "e: " + mCursor.getString(4) + "\n"
                     + "f: " + mCursor.getString(5) + "\n"
                     + "g: " + mCursor.getString(6) + "\n"
                     + "h: " + mCursor.getString(7) + "\n"
                     + "i " + mCursor.getString(8) + "\n"
                     + "j: " + mCursor.getString(9) + "\n"
                     + "k: " + mCursor.getString(10) + "\n"
                     + "l: " + mCursor.getString(11) + "\n"
                     + "m: " + mCursor.getString(12) + "\n"
                     + "n: " + mCursor.getString(13) + "\n"
                     + "o: " + mCursor.getString(14) + "\n"
                     + "p: " + mCursor.getString(15) + "\n"
                     + "q: " + mCursor.getString(16) + "\n"
                     + "r: " + mCursor.getString(17) + "\n"
                     + "s: " + mCursor.getString(18) + "\n";
            } while (mCursor.moveToNext());


        // make sure to close the cursor
        mCursor.close();
    }
  • 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-16T17:39:00+00:00Added an answer on June 16, 2026 at 5:39 pm
    Cursor mCursor =db.query(TABLE_ACCOUNTS, new String[]{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s}, null,null, null, null, null);
    

    Regarding above query.. the second parameter ie a String array is projection parameter means the columns that you want to be fetched in from db and fill it in cursor.

    since if in the query the value of a,b,c,d,e… variables could be different that that of columns in db so there are no values exists in cursor for the requested column.

    Hope that helps ! Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this Method in a DatabaseHelper class: public Cursor getRules() { SQLiteDatabase db=this.getReadableDatabase(); Cursor
public String getContact(String searchName) { SQLiteDatabase db = this.getReadableDatabase(); String[] args = { searchName
Method causing error inside my ContentProvider public static Cursor getSuggestions(String query) { SQLiteDatabase db
I am creating a database like this : SQLiteDatabase db = openOrCreateDatabase(mydata.db,SQLiteDatabase.CREATE_IF_NECESSARY,null); try {
This is my table that was created: public void onCreate(SQLiteDatabase db) { String insertNewFormDetails
SQLiteDatabase db = dbs.getReadableDatabase(); String SQL = SELECT * FROM one a + join
THis is myDB Class //Please take a look at public Cursor getplaces() --- Am
I have this code: DatabaseHandler db = new DatabaseHandler(this); System.out.println(Start - + System.currentTimeMillis()); for
My code below shows this warning: Null pointer access: The variable civs can only
In my activity I have for example SQLiteDatabase db = openOrCreateDatabase(Preferences.DB_NAME, Context.MODE_PRIVATE, null); db.execSQL(CREATE

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.