NEED TO RETURN a dataset:
this is how I would do it going directly from a windows form to sql server:
this is how I would do it going directly from a windows form to sql server:
Code:
private void RetrieveData()
{
//MYSQLSERVERCONNECTION
DBConnStr = "Data Source=blah, blah, blah";
SqlConnection SQLCn = new SqlConnection(DBConnStr);
//MY DATAADAPTER
SqlDataAdapter SQLDA = new SqlDataAdapter("SELECT * FROM dbo.v4Ryan", SQLCn);
//FILL DATASET
SQLDA.Fill(myDataSet, "tblXMLExport");
//EMPTY DATASET
SQLDA.Dispose();
//DEFINE SOURCE
dataGridView2.DataSource = myDataSet.Tables["tblXMLExport"];
//STORE USER XML FILE ON CLIENT MACHINE to edit records when not online.
myDataSet.WriteXml("c:\\t.xml");
myDataSet.WriteXmlSchema("c:\\t.xsd");
}
[CODE]
So guess in the web service I want to return a string, from that create the XML file on client's machine and then bind windows form to that local XML FILE