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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:04:21+00:00 2026-05-13T09:04:21+00:00

I try to add a record to SQLServer db table using LINQ to SQL

  • 0

I try to add a record to SQLServer db table using LINQ to SQL in my WPF app, but always get an error regarding missing directive. Usually intellisense gives a hint on such issue, but not this time. Here my code with all directives:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;
...
...
 DateTime newdate = new DateTime(2010, 2, 1);
 TimeSpan newtime = new TimeSpan(12, 00, 00);    

        MyfirstdbDataContext context = new MyfirstdbDataContext();
        Meeting meeting = new Meeting();
        meeting.MeetID = "01.02.10_12:00";
        meeting.Date = newdate;
        meeting.Time = newtime;
        context.Meetings.Add(meeting); // Here I get the debugger error
        context.SubmitChanges();

And I get this error:

System.Data.Linq.Table’ does not contain a definition for ‘Add’ and no extension method ‘Add’ accepting a first argument of type ‘System.Data.Linq.Table’ could be found (are you missing a using directive or an assembly reference?)

Please, what could be wrong with my code?

  • 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-13T09:04:22+00:00Added an answer on May 13, 2026 at 9:04 am

    The correct syntax is:

    context.Meetings.InsertOnSubmit(meeting);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

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

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

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

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

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Put all your content into a ScrollViewer, that will do… May 16, 2026 at 4:19 pm
  • Editorial Team
    Editorial Team added an answer You can either attach to button's click event or form's… May 16, 2026 at 4:19 pm
  • Editorial Team
    Editorial Team added an answer I don't see any memory management errors -- but I… May 16, 2026 at 4:19 pm

Trending Tags

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

Top Members

Related Questions

I try to add dynamically an iframe to a web page using JavaScript. I
Hi I'd like to use System.Windows.Data.IValueConverter, but when I try to add a reference
I am using VB.net code and SQL server 2005. I am havng below code
I have a table in SQL Server 2005 containing 10000054 records; these records are
i try to add ZipArchive folder that contain source code, then drag and drop
I try to add a row to a listView listView1.Items.AddRange(new ListViewItem[] { item1 });
What happens when you try to add to an NSMutableDictionary once it has already
I'm trying to add a_folder to SVN but I accidentally scheduled my root directory
I have a silverlight 3 application, that fetches some simple data from a ms-sql-server
I have a large table consisting of over 60 millions records and I would

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.