Reputation: 37
I have a web service
[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();
}
}
and when i tried to using the method
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);
}
and i got this error
No overload for method 'Insert' takes '4' arguments
Any Idea?
I have look for the solution at here but i dont really know what it means
Upvotes: 0
Views: 206