Solution to “System.Data.InvalidConstraintException: ForeignKeyConstraint” error

Submitted by admin on
If you encounter the following error: System.Data.InvalidConstraintException: ForeignKeyConstraint FK_foreign_key_name requires the child key values (-1) to exist in the parent table. Or The INSERT statement conflicted with the FOREIGN KEY constraint "FK_foreign_key_name ". The conflict occurred in database "YourDatabase", table "dbo.Tablename", column 'YourPrimaryKey'. The statement has been terminated. Probably you are using a Parent-Child table or Master-Detail table.

Calculate column in DataGridView

Submitted by admin on
In this simple source code you will learn on how to calculate the column (for example Amount column) in a DataGridView control. I have similar tutorial on this about “ How to Calculate Two Columns in DataGridView“ but it lacks a grand total on the Amount column. Additionally the tutorial I have made before don’t have a sample source code so I decided to create one.

Student Book X Upgrade(Sql server 2008 R2)

Submitted by Jazziro on

*Student Book X (Upgrade) v1.9.0.1.1 *Created by: Jazziro/Lehlogonolo Masubelele *Description: Student Book X is an Application that can help niversity/college students store very important contact details of their friends, users can view, edit or delete records. *Easy way to Connect to MS SQL SERVER 2008 R2 with VS 2005. *Easy way to learn SQL Statements: SELECT(Like Conditions), INSERT, UPDATE