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

The Archive Base Latest Questions

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

I have a F# 3.0 program using typeproviders that I am building in Visual

  • 0

I have a F# 3.0 program using typeproviders that I am building in Visual Studio 11. I have a SQL Server 2012 database with a table called Article that has a DateTime column Harvest_Time (not null).

In my program I have:

let newrec = new dbSchema.ServiceTypes.Article( Article_Id = System.Convert.ToInt64(ai))
newrec.Url <- art.Item("url").InnerText
newrec.Source <- art.Item("source").InnerText
newrec.Harvest_time = DateTime.Now
db.Article.InsertOnSubmit(newrec)
db.DataContext.SubmitChanges()

which fails because the value of the Harvest_time column is not being set. If I comment out that line the record is inserted just fine. The failure is on the SubmitChanges() where it complains that the datetime value is not set. No other errors are produced.

What am I doing wrong?

  • 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-04T17:39:13+00:00Added an answer on June 4, 2026 at 5:39 pm

    I see the error:

    I should have used <- rather than = when assigning the value to newrec.Harvest_time.

    I am new to F# (I am primarly a C# coder) and just made a silly misttake.

    Program works fine now.

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

Sidebar

Related Questions

I have finished a program using sql server and visual studio using c# language
I'm learning to program using C# and ASP.NET with a SQL Server database. I
I have a c# program using WPF. I have it that when you press
I have program that sends a file to a printer using 'lpr' command. I
I have simple chat program using WCF service. One service use for server and
I have an OpenGL-program using GLSL, that I can run just fine with the
I have a NodeJs server connecting to redis. I also have a program using
I have a C++ program using OpenMP, which will run on several machines that
I have a c++ program using gstreamer. The problem is that several of my
I have been designing a program using Visual C# and have came across an

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.