Skip to main content
Home Forums Silverlight Programming Accessing Web Services with Silverlight Insert multiple rows into database using asmx web service in silverlight
5 replies. Latest Post by Jonathan Shen – MSFT on November 15, 2009.
(0)
ankit1586
Member
2 points
25 Posts
11-04-2009 7:32 AM |
Hi How to insert multiple rows into database at a time using ASMX web service in silverlight. Any help would be appreciated.
mchlSync
Star
14606 points
2,730 Posts
11-04-2009 8:04 AM |
Hello,
You should be able to send the List as a parameter to the Web Service, right?
Are you having any problem with sending the list?
11-05-2009 6:58 AM |
Thanx for your reply.
According to my application i have to insert so many records into database and for that i created a webmethod . I am using for loop to call this method again and again. For loop runs the no of times which is equal to no of records to be inserted.
pls help me out.
Jonathan...
All-Star
24992 points
2,435 Posts
11-10-2009 3:23 AM |
Hi Ankit1586,
ankit1586:For loop runs the no of times which is equal to no of records to be inserted.
What do you really mean by this? Did you send back all the update records? With your webservice, we can insert the rows one by one your your loop code segment.
Best regards,
Jonathan
11-14-2009 4:39 AM |
Hi
I am sending the records one by one using web service but when the number of records more than 50 that time asmx give the error and only few records are inserted into database. Is there any limit with asmx web service that we cannot send the request to webservice more than 30 at a time?
11-15-2009 10:56 PM |
As far as I know, asmx web service depends on the HttpRuntime.maxRequestLength. Its default value is 4096K(4M). To confirm this, we can add breakpoints to your webservice and get the request data. If we can the complete information, we'd better whether some of the records are invalid and cannot insert into Database. To monitor this, we can easily open the Sql Server Profiler.