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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:41:41+00:00 2026-05-18T10:41:41+00:00

I am connecting to a database using VS2008 DataSets. One of the Tables within

  • 0

I am connecting to a database using VS2008 DataSets. One of the Tables within the database contains a DateTime Column that allows nulls (i.e. Type: DateTime?)

MSDN Datasets categorically states:

The Nullable or Nullable structure is not currently supported in the DataSet.

However on the MSDN site for TableAdapters states that TableAdaters CAN support Nullable Types:

The TableAdapters support nullable types Nullable(Of T) and T?. For more information on nullable types … For more information on nullable types in C#, see Using Nullable Types (C# Programming Guide).

I’m confused!

In the DataSet Designer I have set the offending Column’s property to ‘AllowDBNull=True’ but whenever I run a TableAdapter Query that returns a null DateTime (SELECT * FROM UDF) I get the following Exception: “ArguementOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime.”

One idea I had was to change the type of the Column to System.Object to correctly handle the null values and then I can do the conversions in my own code, however, I still get the same exception being raised.

This question suggests how to deal with the nulls once the query has returned, however I can’t get the query to return.

How can I modify the TableAdapter and/or Dataset to allow me to run a query on the Table that can deal with the nulls in the database?

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

    The solution I found was to use the TO_CHAR() Oracle function and tell the Table Adapter to expect a string value

    SELECT to_char(NULL_DATE_FIELD,'dd/mm/yyyy HH24:MI:SS') FROM *
    

    This means that there is some conversion that needs to happen in the using code. Not ideal though!

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

Sidebar

Related Questions

I have a Java project connecting to an Ingres database and using the Spring
I'm using OLEDB provider for ADO.Net connecting to an Oracle database. In my loop,
I'm using jython 2.2.1, and jdbc 1.2 and connecting to a mssql 2000 database,
I've currently got a tool which allows me to configure a database connection (using
I am using C to write a DLL that provides basic database connection functionality
I am using VS2008. I have a project connect with a database and the
I am using VS2008. I have a project, SystemSoftware project, connect with a database
I am using ASP.NET MVC2 on top of a MySQL database in VS2008. I
[Updated below] I am having a problem connecting to a MySQL database using a
I am connecting to an oracle database using a connection pool. I have set

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.