[英]Web Service Passing Value error (asmx)
我有一個網絡服務
[WebMethod]
public void Insert(int node, int date, int time, int rtt)
{
string query = "INSERT INTO pingresult (node, date, time, rtt) VALUES('"+node+"', '"+date+"', '"+time+"', '"+rtt+"')";
if (this.OpenConnection() == true)
{
MySqlCommand cmd = new MySqlCommand(query, connection);
cmd.ExecuteNonQuery();
this.CloseConnection();
}
}
當我嘗試使用該方法時
public void Main(string[] args)
{
int node, date, time, rtt;
PingService.Service1 s1 = new ConsoleApplication1.PingService.Service1();
node = 1;
date = 090512;
time = 1720;
rtt = 2222;
s1.Insert(node,date,time, rtt);
}
我得到這個錯誤
方法'Insert'的重載沒有接受'4'參數
任何想法?
我在這里尋找解決方案,但我真的不知道這意味着什么
我發現了一個愚蠢的錯誤,即我沒有在客戶端更新我的Web參考,並且在這里找到了答案,並感謝那些提供建議的人。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.