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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:37:56+00:00 2026-05-13T21:37:56+00:00

I have a boolean (BOOL) type field in the SQLite table. In the SubSonic

  • 0

I have a boolean (BOOL) type field in the SQLite table.
In the SubSonic generated DAL it is represented as string (instead of bool).
It is weird.
How it can be managed? Please, help.

alt text http://dl.dropbox.com/u/3882061/sqlite.GIF

  • 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-13T21:37:56+00:00Added an answer on May 13, 2026 at 9:37 pm

    I maybe wrong on this, I have only used Subsonic 2.2 with SQL2008 but I would recommend looking at the source for Subsonic, namely SQLLiteDataProvider.cs and reviewing the DbType function.

    It seems to recognise the type Boolean but not Bool and the default when it does not recognise your type is to resort to String.

    Hare is the code in question from that function

     switch(sqliteType.ToLowerInvariant())
                {
                    case "text":
                    case "char":
                    case "nchar":
                    case "varchar":
                    case "nvarchar":
                        return DbType.String;
                    case "boolean":
                    case "bit":
                        return DbType.Boolean;
                    case "bigint":
                    case "int":
                    case "integer":
                        return DbType.Int64;
                    case "real":
                    case "numeric":
                    case "double":
                    case "single":
                    case "float":
                        return DbType.Single;
                    case "smallint":
                        return DbType.Int16;
                    case "date":
                    case "time":
                    case "datetime":
                    case "smalldatetime":
                    case "timestamp":
                        return DbType.DateTime;
                    case "binary":
                    case "blob":
                    case "image":
                        return DbType.Binary;
                    case "guid":
                        return DbType.Guid;
                    default:
                        return DbType.String;
                }
    

    I would recommend changing it, seeing if it works and then recommeding the change to the subsonic chaps.

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

Sidebar

Related Questions

Since MySQL doesn't seem to have any 'boolean' data type, which data type do
I have a Struts (1.3x) ActionForm that has several String and boolean properties/fields, but
Why isn't Collection.remove(Object o) generic? Seems like Collection<E> could have boolean remove(E o); Then,
I have a boolean variable declared at the top of a class and when
The case goes as following: You have a Boolean property called FullScreenEnabled. You enter
I have a class isSearching with a single boolean property in a 'functions' file
I have an Oracle database and the boolean fields are CHAR(1) with Y/N stored.
I have a DataTable that has a boolean column called [Invalid]. I need to
I have a set of five boolean values. If more than one of these
I have a database column WantsReply that logically holds a boolean (bit) but is

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.