Click here to Skip to main content
15,899,006 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Firends,
SqlConnection con = new SqlConnection(@"Server=NGENIOUS-WSSDEV\SQLEXPRESS;Database=MIC;Trusted_Connectopn= True");
            SqlCommand cmd = new SqlCommand("select * from measurmentunit");
            con.Open();
            DataSet ds = new DataSet();
            SqlDataAdapter da = new SqlDataAdapter();
            da.Fill(ds);
            con.Close();



I am using this code to connect the sql database on the page load but it is giving me Argument Exception keyword not supported "test_connectopn=true"


i am using sql server express 2005 and C# 2008.
Posted
Updated 27-Sep-10 22:20pm
v4

1 solution

Check the spelling of "Trusted_Connection".
 
Share this answer
 
Comments
aayu 28-Sep-10 4:06am    
hey thanks i should make my brain active
aayu 28-Sep-10 4:19am    
can you tell me how to update data on the click of submit button ?? e.g if person put name and add and click on submit then in sql server it should get that name and add.


How to that
Rajesh Sajjanar 28-Sep-10 4:29am    
HI use the insert SQL Query and execute the same on button click event

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