Click here to Skip to main content
16,021,125 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
sir iam newer
iam create a wfaplication using C#
name

address

personal information


iam created table also how to give conection when i click on submit button
Posted
Comments
Rajesh Anuhya 28-Oct-10 6:22am    
No clarity in your Question...
nagababu maridu 28-Oct-10 6:32am    
i got answer sir

Go through the below link for Database Connections

http://connectionstrings.com/[^]
 
Share this answer
 
SqlConnection cnn = new SqlConnection(@"Server=servername;Database=databasename;Trusted_Connection= True");
SqlCommand cmd = new SqlCommand("insert into tablename(name,address ,personal_information)values(@col1,@col2,@col3,@col4 )", con);

cmd.Parameters.AddWithValue("@col1",controlname);
cmd.Parameters.AddWithValue("@col2", controlname);
cmd.Parameters.AddWithValue("@col3", controlname);
cmd.Parameters.AddWithValue("@col4 ", controlname);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
 
Share this answer
 
v2
Comments
Mohd Wasif 28-Oct-10 6:25am    
where controlname means the control u want to pass .
nagababu maridu 28-Oct-10 6:31am    
thnk u sir

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900