Windows mobile开发:现有连接被远程主机强行关闭
在PPC模拟器上调试,能成功连接webservice,在调用
public DataTable GetDataTable(string strsql)
{
DataTable dt = new DataTable();
SqlConnection con = new SqlConnection();
try
{
dt.TableName = "temp";
con = GetConnetion();
SqlDataAdapter da = new SqlDataAdapter(strsql, con);
da.Fill(dt);
da.Dispose();
da = null;
}
catch (Exception ex)
{
throw ex;
}
finally
{
con.Dispose();
}
return dt;
}
方法调用成功后,返回客户端抛出异常“现有连接被远程主机强行关闭”,请达人指教,感激不尽!!!
开发工具:sqlserver2005 ,vs2008