T
ton
When i call web service from smart device application (c#),
It display error PlatfomrNotSupportedException.
My web service return data set.
But i call this web service from window application , It work fine.
Code example web service is below.
[WebMethod]
public DataSet RetrieveHospital()
{
string strQuery = "SELECT * FROM Hospital";
SqlConnection conn = new SqlConnection(_connectionString);
SqlDataAdapter da;
DataSet ds;
da = new SqlDataAdapter(strQuery,conn);
ds = new DataSet( );
da.Fill(ds);
conn.Close();
conn.Dispose();
conn=null;
return ds;
}
Code example of Smart Device Application (C#) is below.
DataSet ds;
_10._0._0._1.Service1 serv1=new SSI._10._0._0._1.Service1();
try
{
ds=serv1.RetrieveHospital(); <- It error on this line
}
catch (System.Web.Services.Protocols.SoapException ex)
{
MessageBox.Show(ex.Message,"Error");
}
Help me please
Thanks in advance
It display error PlatfomrNotSupportedException.
My web service return data set.
But i call this web service from window application , It work fine.
Code example web service is below.
[WebMethod]
public DataSet RetrieveHospital()
{
string strQuery = "SELECT * FROM Hospital";
SqlConnection conn = new SqlConnection(_connectionString);
SqlDataAdapter da;
DataSet ds;
da = new SqlDataAdapter(strQuery,conn);
ds = new DataSet( );
da.Fill(ds);
conn.Close();
conn.Dispose();
conn=null;
return ds;
}
Code example of Smart Device Application (C#) is below.
DataSet ds;
_10._0._0._1.Service1 serv1=new SSI._10._0._0._1.Service1();
try
{
ds=serv1.RetrieveHospital(); <- It error on this line
}
catch (System.Web.Services.Protocols.SoapException ex)
{
MessageBox.Show(ex.Message,"Error");
}
Help me please
Thanks in advance