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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:58:10+00:00 2026-05-12T15:58:10+00:00

The INSERT statement conflicted with the CHECK constraint ck_str_member_no . The conflict occurred in

  • 0

The INSERT statement conflicted with the CHECK constraint “ck_str_member_no“. The conflict occurred in database “C:\DOCUMENTS AND SETTINGS\KARTHIKEYAN\DESKTOP\KOK\DB\INFT3009_ASS1_C3104855.MDF”, table “dbo.Members”, column ‘str_member_no‘.
The statement has been terminated.

I am using .MDF file in my visual studio 2008 Express. How do I solve it?

My insert Procedure :


ALTER PROCEDURE [dbo].[AddNewAGCMember] 
  -- Add the parameters for the stored procedure here
  @str_member_no varchar(6) = '', 
  @str_member_name varchar(50) = '',
  @str_member_password varchar(10) = '',    
  @str_addr_apartment_no varchar(10) = NULL,    
  @str_addr_building_name varchar(50) = NULL,   
  @str_addr_street_name varchar(50) = NULL, 
  @int_postal_code int = NULL,  
  @str_country_name varchar(50) = NULL, 
  @int_contact_no int = NULL,   
  @str_email_addr varchar(100) = '',    
  @date_registration date = ''  
AS
BEGIN
  -- SET NOCOUNT ON added to prevent extra result sets from
  -- interfering with SELECT statements.
  SET NOCOUNT ON;

  -- Insert statements for procedure here
  INSERT INTO Members 
    (str_member_no,
     str_member_name,
     str_member_password,
     str_addr_apartment_no,
     str_addr_building_name,
     str_addr_street_name,
     int_postal_code,
     str_country_name,
     int_contact_no,
     str_email_addr,
     date_registration) 
  VALUES
    (@str_member_no, 
     @str_member_name,
     @str_member_password,
     @str_addr_apartment_no,
     @str_addr_building_name,
     @str_addr_street_name,
     @int_postal_code,
     @str_country_name,
     @int_contact_no,
     @str_email_addr,
     @date_registration);
END

Table structure :

  • str_member_no, varchar(6), Unchecked
  • str_member_name, varchar(50), Unchecked
  • str_member_password, varchar(10), Unchecked
  • str_addr_apartment_no, varchar(10), Checked
  • str_addr_building_name, varchar(50), Checked
  • str_addr_street_name, varchar(50), Checked
  • int_postal_code, int, Checked
  • str_country_name, varchar(50), Checked
  • int_contact_no, int, Checked
  • str_email_addr, varchar(100), Unchecked
  • date_registration, date, Unchecked

    Unchecked
    
  • 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-12T15:58:11+00:00Added an answer on May 12, 2026 at 3:58 pm

    Obviously, your insert is violating a check constraint. This is a constraint in your database the performs a specific check – that a numeric value is in a particular range, that a string is at most n characters long, or whatever.

    To find out what the check constraint is, try this:

    SELECT
    name, definition 
    FROM
        sys.check_constraints
    WHERE
        name = 'ck_str_member_no'
    

    This will give you the expression that is being checked in the “definition” column.

    From that expression, you should be able to determine why your insert is being rejected. Fix the problem and insert again.

    If you really cannot fix your data, and if you do not need / want that check constraint in place, you can drop it:

    ALTER TABLE dbo.Members
       DROP CONSTRAINT ck_str_member_no
    

    Marc

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

Sidebar

Related Questions

Error: System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK__Item__order__3AE27131". The conflict
In Informix I can run SQL statement that use other database: INSERT INTO other_db:mytable
Msg 547, Level 16, State 0, Line 1 The INSERT statement conflicted with the
I had a parametrized insert statement that was working well and I needed to
How can I write an insert statement which includes the & character? For example,
I'm trying to use a BULK INSERT statement to populate a large (17-million-row) table
Using only MySQL , I'm seeing if it's possible run an insert statement ONLY
I tried running the following statement: INSERT INTO VOUCHER (VOUCHER_NUMBER, BOOK_ID, DENOMINATION) SELECT (a.number,
I know that I can insert multiple rows using a single statement, if I
Can I find out when the last INSERT, UPDATE or DELETE statement was performed

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.