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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:01:26+00:00 2026-05-21T10:01:26+00:00

hii its the first time i use database in c#. i am trying to

  • 0

hii

its the first time i use database in c#. i am trying to add database to visual studio c# ,, read data and save data to the database.

so i have created a database and a table inside it called “Users”. then i connect the windows forms to the database.

after that it worked fine in retrieving data ( query: all users) but after i have edited a column type from dateTime to int,, it gives me an exception ” Constraints Exception was unhandled at the following line

this.usersTableAdapter.Fill(this.smartHomeDataSet.Users);

and the form dosent load at all. !!

so i guess there is something i have to do , after the changes i have made to the database table, so it can be applied to my application.

it might be something easy and obvious, but forgive me its my first time in database.

thanks for your help, All.

edit:

what i did, is editing the column (date of birth) in the table definition

it was: dateTime – not allowNull

changed to : int – allowNull

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

    You do not need to regenerage the dataset. Follow the steps to update your dataset.

    1.) Goto Typed DataSet designer. Right click the TableAdapter header and select Configure option. This will launch the Table Adapter configuration wizard.

    2.) Normally complete the Wizard and update the fields in the Query Designer step. This is where it will add the new coloumns and remove the coloumns not found in the resultset of the query.

    3.) After completing the wizard you’ll quickly observe that the new fields have been added into the Corresponding DataTable. This will also ensure the result set of all TableAdapter methods is also updated and you do not need to change each method individually. we have done this many times, and it always works without fail.

    4.) Only thing you need to do manually is removal of the coloumns from DataTable, in case if you have removed field from the query. The wizard will update and add the coloumns but it will not remove the coloumns from the DataTable. Simply,just go ahead and delete the coloumn from the DataTable.

    You’re done.

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

Sidebar

Related Questions

Hii , I have been trying to write a program... We have a structure
Hi I'm trying to write my first report!!! and have number of question I
Hi I am trying to deploy an application using webstart. I have a requirement
Hi i have a couple of question about using named pipes. Firstly, when trying
Hi this question or problem i have its very hard i have search and
Hi i have made my own UserControl, its a little windows explorer. i defined
hi i have create one simple media player.... now its working fine. i retrieve
hi I'm really frustrated, First I have no idea how to code the very
Hi I've got a DIV section that has only its title visible initially. What
Hi I'm trying to debug a stored procedure through SQL Analyzer and one of

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.