3
Answers

While insert Record it will display message recordalready exists Visual studio 2005 with SQL Server

narasiman man

narasiman man

13y
1.5k
1
While insert same  Record it will display message recordalready exists Visual studio 2005 with SQL Server


textbox1 = Projectcode

textbox2 = Projectname
textbox3 = ProjectDesc
textbox4 = Cost

my code:


protected void Button1_Click(object sender, EventArgs e)
{
con.Open();

str = "insert into Project values('"+TextBox1.Text+"','" + TextBox2.Text + "','" + TextBox3.Text + "'," + TextBox4.Text + ")";

cmd = new SqlCommand(str, con);
cmd.ExecuteNonQuery();

Response.Write("Record inserted Successfully");
con.Close();
}

Answers (3)
0
Suthish Nair
NA 31.7k 4.6m 13y
Accept the post as Answer, if resolved !
Accepted
0
Suthish Nair
NA 31.7k 4.6m 13y
How come my post got accepted as Answer?
0
azzo trigo
NA 26 30.8k 14y
thanks again Vulpes,your great.
0
Vulpes
NA 98.3k 1.5m 14y
Wikipedia have a decent article on ERDs (http://en.wikipedia.org/wiki/Entity-relationship_model).

Also, whilst it's a bit rambling at times, I found this link (http://members3.jcom.home.ne.jp/daruma_kyo/en/aboutooa/classD_ERD_classExtraction.html) which brings out the differences between class diagrams and ERDs.

0
azzo trigo
NA 26 30.8k 14y
thanks vulpes you are great,i wonder if you could suggest were i could read further on this.thanks
0
Vulpes
NA 98.3k 1.5m 14y
Entity Relationship Diagrams are more limited in scope than class diagrams. If you were trying to use them as an alternative to the latter, then:

1. They wouldn't deal with how your classes interacted with each other.

2. They wouldn't deal with how the data in your classes could be manipulated.

For these reasons, ERDs are usually confined to modelling relational databases rather than whole applications.