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 6682659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:43:55+00:00 2026-05-26T04:43:55+00:00

I am new to android here i am facing problem when i try to

  • 0

I am new to android here i am facing problem when i try to pass the retrived data from curser to bundle then i am not able to get the value of that variable.Below is my code please help me to come out from this situation.

Cursor cur3 = db3.rawQuery(“SELECT * FROM ” + TableName, null);

try {

            db3  = this.openOrCreateDatabase("remoteid.db", MODE_PRIVATE, null);

            if(cur3 != null )  
            {   
                if(cur3.moveToFirst())
                {
                    do {
                        valueOfID =  cur3.getString(cur3.getColumnIndex("PretestID"));
                         valuOfDate = cur3.getString(cur3.getColumnIndex("Date"));
                         textType = cur3.getString(cur3.getColumnIndex("txtVCT"));                                                      
                         valueOfDDLTS = cur3.getString(cur3.getColumnIndex("ddlTestingSession"));
                         valueOfReason = cur3.getString(cur3.getColumnIndex("txtReason"));
                         valueOfHowmany = cur3.getString(cur3.getColumnIndex("txthowmany"));
                         valueOftxtques1 = cur3.getString(cur3.getColumnIndex("txtques1"));
                         valueOfrblques2a = cur3.getString(cur3.getColumnIndex("rblques2a"));
                         valueOfrblques2b = cur3.getString(cur3.getColumnIndex("rblques2b"));
                         valueOfrblques3 = cur3.getString(cur3.getColumnIndex("rblques3"));
                         valueOftxtques4 = cur3.getString(cur3.getColumnIndex("txtques4"));
                         valueOfrblques5 = cur3.getString(cur3.getColumnIndex("rblques5"));
                         valueOfrblques6 = cur3.getString(cur3.getColumnIndex("rblques6"));
                         valueOfrblques7 = cur3.getString(cur3.getColumnIndex("rblques7"));
                         valueOfrblques8 = cur3.getString(cur3.getColumnIndex("rblques8"));
                         valueOfrblques9 = cur3.getString(cur3.getColumnIndex("rblques9"));
                         valueOfddlsick = cur3.getString(cur3.getColumnIndex("ddlsick"));
                         valueOftxtques11 = cur3.getString(cur3.getColumnIndex("txtques11"));
                         valueOfrblques12 = cur3.getString(cur3.getColumnIndex("rblques12"));
                         valueOftxtques13 = cur3.getString(cur3.getColumnIndex("txtques13"));
                         valueOftxtques14 = cur3.getString(cur3.getColumnIndex("txtques14"));
                         valueOfrblques15 = cur3.getString(cur3.getColumnIndex("rblques15"));
                         valueOfrblques16 = cur3.getString(cur3.getColumnIndex("rblques16"));
                         valueOfrblques17 = cur3.getString(cur3.getColumnIndex("rblques17"));
                         valueOftxtques18 = cur3.getString(cur3.getColumnIndex("txtques18"));

                         //Toast.makeText(getApplicationContext(), valueOftxtques18, Toast.LENGTH_SHORT).show();

                    }while (cur3.moveToNext());
                }
            }

        }

        catch(Exception e) {
            Log.e("Error", "Error", e);

        } finally {
            if (db3 != null)
                db3.close();
        }
        cur3.close();   



        arrayadapter11 = new simpleefficientadapter(Screening.this,prtestData);
        arrayadapter22 = new simpleefficientadapter(Screening.this,screeningData);
        arrayadapter33 = new simpleefficientadapter(Screening.this,postData);

        mylist1.setAdapter(arrayadapter11);
        mylist1.setOnItemClickListener(this);
        mylist2.setAdapter(arrayadapter22);
        mylist2.setOnItemClickListener(this);
        mylist3.setAdapter(arrayadapter33);
        mylist3.setOnItemClickListener(this);
    }


    @Override
    public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
        Intent intent;
        switch (arg0.getId()) {
        case R.id.prescreenlist:            
            intent = new Intent(getApplicationContext(), NewScreening.class);       
            Bundle bundle = new Bundle();   

            bundle.putString("DateValue", valuOfDate);  
            bundle.putString("TT", textType);   
            bundle.putString("idValue", valueOfID); 
            bundle.putString("ddltsValue", valueOfDDLTS);   
            bundle.putString("reasonValue", valueOfReason); 
            bundle.putString("howmanyValue", valueOfHowmany);   
            bundle.putString("textqus1Value", valueOftxtques1); 
            bundle.putString("textqus2aValue", valueOfrblques2a);   
            bundle.putString("textqus2bValue", valueOfrblques2b);   
            bundle.putString("rbqs3Value", valueOfrblques3);    
            bundle.putString("rbqs4Value", valueOftxtques4);    
            bundle.putString("rbqs5Value", valueOfrblques5);    
            bundle.putString("rbqs6Value", valueOfrblques6);    
            bundle.putString("rbqs7Value", valueOfrblques7);    
            bundle.putString("rbqs8Value", valueOfrblques8);    
            bundle.putString("rbqs9Value", valueOfrblques9);    
            bundle.putString("ddlsValue", valueOfddlsick);  
            bundle.putString("tq11Value", valueOftxtques11);    
            bundle.putString("tq12Value", valueOfrblques12);    
            bundle.putString("tq13Value", valueOftxtques13);    
            bundle.putString("tq14Value", valueOftxtques14);    
            bundle.putString("rbqs15Value", valueOfrblques15);  
            bundle.putString("rbqs16Value", valueOfrblques16);
            bundle.putString("rbqs17Value", valueOfrblques17);  
            bundle.putString("rbqs18Value", valueOftxtques18);

            intent.putExtras(bundle);

            startActivityForResult(intent, 1);

            setResult(1,intent);


            break;
  • 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-05-26T04:43:56+00:00Added an answer on May 26, 2026 at 4:43 am

    A wiser move, might be passing the id of that database row to the next Activity.

    And your code is incomplete, but it looks like only the last row’s data will ever be passed to the next activity.

    Also, it might be mildly more efficient and clear if you just putExtra directly into the intent instead of the intermediary Bundle.

    Good practices said to include the package name as a prefix in the extra names.

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

Sidebar

Related Questions

Extreme Android developer newbie here...well, new to Android development, not development in general. I
im new to android gaming and started andengine and facing problem while using createTiledFromAsset
New Android developer here. I'm following a tutorial at http://www.vogella.de/ . The first applications
New Android developer here - I'm hoping this is simple. I want to create
new Android developer here. I'm doing a form that let's users set up some
i am very new to android and i am stuck here. i have a
I am new to Android following is my code I wants to add data
I'm using a chart taken from here http://writerbay.wordpress.com/2011/03/12/android-tutorial-displaying-chart-on-android/#comment-54 to draw a graph in android.
Im new to android and im facing some issues... Im using a SurfaceView to
I am making android app in which I am facing problem . The overview

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.