Click here to Skip to main content
16,020,974 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi there
I read your article from here:http://www.codeproject.com/KB/database/sqldawithoutsqlcb.aspx"
and I used this code:
string connection = "Server=NIMIS\\TEST;database=Projects;integrated security=true";
string query="UPDATE fest SET nwem='6' WHERE num='20'";
SqlConnection mycon = new SqlConnection(connection);
SqlDataAdapter mydaap = new SqlDataAdapter("select * from  fest", mycon);
SqlCommand up = new SqlCommand(query, mycon);
DataSet myset = new DataSet();
mydaap.Fill(myset, "fest");
mydaap.UpdateCommand = up;
mydaap.Update(myset, "fest");

but my table did not updated...
please help me to find what is the problem problem...
thank you:thumbsup:
Posted
Comments
Henry Minute 1-Oct-10 0:30am    
You appear to be trying to contact the author of the article. This is not the right place. Go back to the Article, scroll right to the bottom, you should see a Messages section, click 'New Message' and ask your question there. Then it will go straight to the Author.
Toli Cuturicu 1-Oct-10 17:09pm    
Don't post here! Post at the article foruym instead!
I downvoted your question because of this.
Next time I will simply delete it.

1 solution

you didn't execute the command!!!!
up.ExecuteNonQuery();
 
Share this answer
 

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