Skip to main content

Microsoft Silverlight

Answered Question Insert multiple rows into database using asmx web service in silverlightRSS Feed

(0)

ankit1586
ankit1586

Member

Member

2 points

25 Posts

Insert multiple rows into database using asmx web service in silverlight

Hi How to insert multiple rows into database at a time using ASMX web service in silverlight. Any help would be appreciated.

mchlSync
mchlSync

Star

Star

14606 points

2,730 Posts

Silverlight MVP
Answered Question

Re: Insert multiple rows into database using asmx web service in silverlight

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?

(If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

Regards,
Michael Sync
Silverlight MVP

Blog : http://michaelsync.net


ankit1586
ankit1586

Member

Member

2 points

25 Posts

Re: Re: Insert multiple rows into database using asmx web service in silverlight

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 Shen – MSFT
Jonathan...

All-Star

All-Star

24992 points

2,435 Posts

Microsoft

Re: Re: Insert multiple rows into database using asmx web service in silverlight

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

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

ankit1586
ankit1586

Member

Member

2 points

25 Posts

Re: Re: Re: Insert multiple rows into database using asmx web service in silverlight

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?

Jonathan Shen – MSFT
Jonathan...

All-Star

All-Star

24992 points

2,435 Posts

Microsoft
Answered Question

Re: Re: Re: Insert multiple rows into database using asmx web service in silverlight

Hi Ankit1586,

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.

Best regards,

Jonathan

Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities