Editing Database Table From Windows App
Can someone point me to some resources that explain how I can edit a database table on a server from a desktop application?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Lalit MRank #1,186 · 1.5K reputationPosted Feb 12, 2010, 7:42 AM EST
http://www.codeproject.com/KB/architecture/DataModifierFramework.aspx
Algo Rhythm40 reputationPosted Feb 12, 2010, 10:56 AM EST
OK, I have this code in a web service. Trying to update from a client Windows app. Specifically, I need to get the setContacts method working so that it actually updates the table. Right now it does nothing.
[WebMethod]
public DataTable getContacts()
{
using (SqlConnection con = new SqlConnection(connString))
{
DataTable dt = new DataTable("Contacts");
SqlCommandBuilder cb = new SqlCommandBuilder(da);
da = new SqlDataAdapter("SELECT * FROM Contacts", con);
da.Fill(dt);
return dt;
};
}
[WebMethod]
public void setContacts(DataTable table)
{
using (SqlConnection con = new SqlConnection(connString))
{
DataTable dt = new DataTable("Contacts");
SqlCommandBuilder cb = new SqlCommandBuilder(da);
da = new SqlDataAdapter("SELECT * FROM Contacts", con);
da.Fill(dt);
da.Update(table);
};
}