Hi All,
I am developing a windows mobile application which works with web service.
In my application i am calling a WebMethod which takes dataset as parameter and returns a integer value.
but when i make a call to web method i am getting this error
Error occurs on calling the WebMethod "Client found response content type of 'text/html; charset=us-ascii', but expected 'text/xml'.
here is the webmethod code
[WebMethod]
public int GetServices(DataSet ds)
{
SqlConnection con = new SqlConnection(constring);
int rows = ds.Tables[0].Rows.Count;
int srows = 0;
foreach(DataRow dr in ds.Tables[0].Rows)
{
string query = "insert into Services(tckid,dscr,lngdesc,loc,asset,rptdt,crdt) values('"+dr[0].ToString()+"','"+dr[1].ToString()+"','"+dr[2].ToString()+"','"+dr[3].ToString()+"','"+dr[4].ToString()+"','"+dr[5].ToString()+"')";
SqlCommand cmd = new SqlCommand(query, con);
con.Open();
int r = cmd.ExecuteNonQuery();
if (r == 1)
{
srows = srows + 1;
}
}
return srows;
}
can any one have idea about this?if yes please share with me.
Thanks,Balu