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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:55:30+00:00 2026-05-12T09:55:30+00:00

I am struggling pulling a simple list of records from one table object and

  • 0

I am struggling pulling a simple list of records from one table object and printing them out.

I have a table called [Acceptance] that has four fields, two of which allow nulls. Here is the ddl for the schema object:

CREATE TABLE [dbo].[Acceptance](
    [AcceptanceID] [int] IDENTITY(1,1) NOT NULL,
    [AcceptanceCode] [nvarchar](2) NOT NULL,
    [AcceptanceDesc] [varchar](25) NOT NULL,
    [SortOrder] [tinyint] NOT NULL,
 CONSTRAINT [PK_Acceptance] PRIMARY KEY CLUSTERED 
(
    [AcceptanceID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

When I try to render a single field of a single record to the console using the following code:

var a = Acceptance.All();
            Console.WriteLine(a.First().AcceptanceID);
            Console.Read();

I get the following exception:

System.ArgumentException was unhandled Message=”Object of type ‘System.Byte’ cannot be converted to type ‘System.Boolean’.”

None of my fields are of type Bit/Boolean. I’m just not getting it…

Nullable types and Linq Query syntax are 2 topics that I am struggling with…

Any insight into how do this properly is greatly appreciated.

Thanks,

Josh

  • 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-12T09:55:30+00:00Added an answer on May 12, 2026 at 9:55 am

    What DB are you using? I’m going to guess MySQL… you can go into the T4s and change the way the system type is defined. For the default template that’s SQLServer.tt, with MySQL its MySQL.tt. Just look for where we set tinyint – it’s an ongoing issue (with me at least) with returning byte[] vs bool – set as needed.

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

Sidebar

Related Questions

I have been struggling trying to test a super simple EJB project in netbeans.
After struggling all weekend, I finally have a sphere reflecting its environment in OpenGL.
I'm struggling with ways how to input user preferences for given set. I have
i've created a simple panel with a title bar, and i'm trying to share
Struggling to find a bit of code to easily understand. How do you add
I'm struggling with paperclip and adding the attached images to albums. Should I be
I've been struggling with this for 7 days now. Your insights will be greatly
I am struggling with a problem that In my application Im having audio files
I am currently struggling to get the following code to compile. First the header
I am struggling to know where to start when trying to assign ranks to

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.