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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:44:14+00:00 2026-05-27T10:44:14+00:00

I have following text in SQLITE database in TEXT field The exact date of

  • 0

I have following text in SQLITE database in TEXT field

The exact date of his birth is not known. The consensus of opinion, however, is that he was born around 580 B.C He was younger than the his friends.

He belonged to a noble family.

When I read this from DB and add to ArrayList<String> I get following error message

14): unknown error: Unable to convert BLOB to string
14): unknown error: Unable to convert BLOB to string
14): unknown error: Unable to convert BLOB to string
14): unknown error: Unable to convert BLOB to string
14): Closing Cursor

I am confused why its becoming a blob? here is how I am reading this

String select = "SELECT heading,text FROM details WHERE chapter_id = \'" + tocIDX + "\'" ;

Constants.c = Constants.myDataBase.rawQuery(select, null);



int headingIndex = Constants.c.getColumnIndex("heading");
int headingTextIndex = Constants.c.getColumnIndex("text");

Constants.c.moveToFirst();
    if (Constants.c != null) {


        if (Constants.c.isFirst()) {

            int i = 0;

                /* Loop through all Results */ 

                do {

                        i++;
                        if(Constants.Debug){
                            Log.d("toc", "Row # " + i);}

                        try{
                              headingIndex.add(Constants.c.getString(headingIndex));
                            headingTextIndex.add(Constants.c.getString(headingTextIndex));          


    } catch (Exception e) {if(Constants.Debug){Log.d("toc", e.getMessage());}   }


                } while (Constants.c.moveToNext());

Highly appreciate your help

  • 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-27T10:44:16+00:00Added an answer on May 27, 2026 at 10:44 am

    I think the data type of heading and text columns are defined as BLOB. you can substring the data to get You have two way.

    • Approach-1) use SUBSTRING to get string from the BLOB data.

    • Approach-2) If possible use VARCHAR instead of BLOB as data type

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

Sidebar

Related Questions

I have a SQLite database that has a time field set as a text
I have created an sqlite table using the following statement: CREATE TABLE IF NOT
I'm trying to store enum in SQLite database using QSql. I have following class:
I have the following query in SQLite: SELECT * FROM t1 ORDER BY t1.field
I have a description column in my SQLite database that contains some text to
I have following text in a file 23456789 When I tried to replace the
I have the following text tooooooooooooon According to this book I'm reading, when the
I have the following text: <i><b>It is noticeably faster.</b></i> <i><b>They take less disk space.</i>
I have the following text from an academic course I took a while ago
I have the following text in xml file: <Config Builder=LP Wizard> <Libraries> <Library Name=XCAMSource/>

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.