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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:49:00+00:00 2026-05-10T23:49:00+00:00

I am trying to figure out the best way in an asmx web service

  • 0

I am trying to figure out the best way in an asmx web service to indicate null for a date so that I can insert dbnull.value when the user doesn’t enter text into a date field. Currently I have a string field in the class that I am serializing that will serve as the date field. When that string is blank I insert dbnull.value, otherwise I insert the string converted to a datetime. IS this the only way or is there a better way? What about for integers and doubles? Thanks.

  • 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. 2026-05-10T23:49:00+00:00Added an answer on May 10, 2026 at 11:49 pm

    I guess it depends on what mechanism you are using to do your database inserts e.g. parameterized SQL, stored procedure, etc. If using parameterized SQL, I think your current solution is fine, although if the database table field for date allows nulls, I don’t think it is necessary to pass a value for the date column in the INSERT statement if the date field is blank. If using a stored procedure, you could set the date as an optional parameter with a NULL default value.

    BTW, are you using the asp.net ajax mechanism for parsing dates in JSON? e.g.

    \/Date(1169125740)\/  //1169125740 is the number of milliseconds since UTC (Midnight January 1, 1970) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 74k
  • Answers 74k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Try adding border-collapse: collapse; to your table's styles. Documentation Here.… May 11, 2026 at 2:18 pm
  • added an answer The Duration property is not expressible in a SQL statement… May 11, 2026 at 2:18 pm
  • added an answer My suggestion is to use Firefox and the Web Developer… May 11, 2026 at 2:18 pm

Related Questions

I am trying to figure out the best way to parse this comma delimited
I am writing a web service in Java, and I am trying to figure
I have an XML schema that represents a product in a DB, and I
I am trying to implement a request to an unreliable server. The request is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.