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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:11:55+00:00 2026-06-04T22:11:55+00:00

I am using the sqlite v3, i have the table which has some columns

  • 0

I am using the sqlite v3, i have the table which has some columns of data type ‘bit’. I have inserted some data in this table with value ‘true’ in bit columns, But the problem is that when i retrieve the data using C# code it always return the value ‘false’.

The same query and same database is working fine for my android application. But, when i retrieve these data from C# or windows, than it returns the unusual results.

Sqlite admin shows the correct result in query pane…..
I am using chrome browser….
My C# code is

SQLiteConnection sqlite_connection =null;

        if(isTrans)
            sqlite_connection = sqliteTrans.Connection;
        else
            sqlite_connection = this.ConnectionInstance;

        try
        {  
            SQLiteCommand sqlite_command = new SQLiteCommand("SELECT AdditionalServices, VitalObservation from tblReadonlyPatientData where SubscriptionID = 1306", sqlite_connection);
            SQLiteDataReader reader = sqlite_command.ExecuteReader();
            StringBuilder queryToExecute = new StringBuilder();

            while (reader.Read())
            {
                queryToExecute.Append(reader.GetString(0));
            }

            // always call Close when done reading. 
            reader.Close();
            reader = null;
            sqlite_command = null

        }
            catch (Exception e)
            {
                clsException.ExceptionInstance.HandleException(e);
                throw;
            }
            finally
            {
                if (!isTrans && sqlite_connection != null)
                {
                    if (sqlite_connection.State == System.Data.ConnectionState.Open)
                        sqlite_connection.Close();                    
                }
            }     

These columns are the bit datatype and ‘true’ values but returns false.

  • 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-04T22:11:56+00:00Added an answer on June 4, 2026 at 10:11 pm

    i have update the sql lite query and cast the bit columns into nvarchar, so it return me the string in ‘true’ or ‘false’ format

    SQLiteCommand sqlite_command = new SQLiteCommand("SELECT Cast(AdditionalServices as nvarchar(10)) as AdditionalServices, Cast(VitalObservation as nvarchar(10)) as VitalObservation from tblReadonlyPatientData where SubscriptionID = 1306", sqlite_connection);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table which has data from a graph. for example index value
I have a table login2 in /data/data/sankalp.jain.shre/databases/loginfinal.db. The database has been created correctly which
I have a huge table, which has 3 columns and about 333,000 rows. The
I have a table in my database in SQLITE which has x and y
I have a table view which is populated from data from an SQLite database.
I want to read all rows in a table using system.data.sqlite. As I have
Using sqlite3, I have a table that looks like this: +---------+-----------------+----------+-----------+--------+ | ArtId |
Using SQLite in PHP (thus using PDO), I have this code: try { $db
I am relatively new to using SQLite on Android. I have some experience with
I currently have a closure table used for hierarchical data that has 5 million

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.