Error Updating Records using web services [Resolved]

Posted by Jopito under ASP.NET on 11/6/2013 | Points: 10 | Views : 1624 | Status : [Member] | Replies : 7
Hellow Friends,am using a method to update records in a db.The method shows records updated but still when you check on the values in that method,it doesnt show the newly added records but the previous one.When i update from soapUi,it updates well but from the client side it cannot update.How can i solve this.Thanks

Mark as answer if satisfied


Responses

Posted by: vishalneeraj-24503 on: 11/6/2013 [Member] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
Hi,

Have you given proper Web Reference to your Web Service.

Please remove web reference from solution explorer and again add web reference for your Web Service. And try to call method and update record in DB.

and also debug your code if there is any exception occurring or have you by-passed exception, thatswhy you are not getting any Error.
Kindly check this also and let me know please.

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 11/6/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
Please check if you are passing the updated value id properly form client side to web-service.
Can you post you update code form client side so that we can help you.

Happy Coding,
If it helps you or directs U towards the solution, MARK IT AS ANSWER

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jopito on: 11/6/2013 [Member] Starter | Points: 25

Up
0
Down
Hi this is my code to update
if (Page.IsValid)
{
string ipAddress = IpAddress1Radtextbox.Text;
int ipstatus = Convert.ToInt32(ipAddressStatusCombobox.SelectedValue);
long iplistid = Convert.ToInt64(Request.QueryString["IpListId"]);
bool result = client.UpdateWhitelistedIP(iplistid, ipAddress, ipstatus);
if (result)
{
Labelerror.Text = "Records Updated";
}
else
{
Labelerror.Text = "Not Updated";
}







}

}

Mark as answer if satisfied

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jopito on: 11/6/2013 [Member] Starter | Points: 25

Up
0
Down
if (Page.IsValid)
{
string ipAddress = IpAddress1Radtextbox.Text;
int ipstatus = Convert.ToInt32(ipAddressStatusCombobox.SelectedValue);
long iplistid = Convert.ToInt64(Request.QueryString["IpListId"]);
bool result = client.UpdateWhitelistedIP(iplistid, ipAddress, ipstatus);
if (result)
{
Labelerror.Text = "Records Updated";
}
else
{
Labelerror.Text = "Not Updated";
}




Her e is the method to update


}

}

Mark as answer if satisfied

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: vishalneeraj-24503 on: 11/6/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Hi,

make sure you are passing the right parameter value to webservice method.

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jopito on: 11/6/2013 [Member] Starter | Points: 25

Up
0
Down
As seen here,the same paremeters in the client side are the ones still at soapUi.But updating tfrom SoapUi work.I cant figure out the problem


Mark as answer if satisfied

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jopito on: 11/6/2013 [Member] Starter | Points: 25

Up
0
Down
Thanks for that.I noticed my textboxes had binding but instead of getting data from code behind.Have tried your method and it worked,Thanks

Mark as answer if satisfied

Jopito, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response