how to send 100 controls data to db sp as parameters? [Resolved]

Posted by Rajendra.prasad under ASP.NET on 5/6/2011 | Points: 10 | Views : 1064 | Status : [Member] | Replies : 5
Hi,
how to send 100 controls data to db sp as parameters? Means, in UI there are around 100 controls need to send those controls values as parameters to a sp in DAL layer. how. any idea//

Regards
Rajendra




Responses

Posted by: Lokesh76 on: 5/7/2011 [Member] Starter | Points: 50

Up
0
Down

Resolved
As mention by you 100 controls so Its not good idea to pass data in as sqlparameter for each controls rather then this make a variable with complete data string with "|" or any other character which is not used in values itself and then pass to SP as a parameter in DB side separate the values and save to DB.

If you find out of 100 control values some of them is containing large data make them separate.

Thanks
Lokesh Kumar

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

Posted by: Kumar_jay99 on: 5/7/2011 [Member] Starter | Points: 50

Up
0
Down

Resolved
I think, we can also send 100 controls data through XML and Procedure we can separate it.

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

Posted by: Lokesh76 on: 5/7/2011 [Member] Starter | Points: 25

Up
0
Down
Yes agree, thats also good way to doing the same. thanks

Thanks
Lokesh Kumar

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

Posted by: Vuyiswamb on: 5/7/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Guys tell me,

What kind of Application is Sending 100 paramters to a a StoredProcedure , or to the the database ?

This should be a red alert , that this is not correct, there is something wrong here. You should not help people to do wrong things.

Rajendra.prasad why do want to send 100 paraters , you want to tell me that you have a storedprocedure or a page that accept 100 controls ? i wonder who will be doing data capturing in that application.


Thank you for posting at Dotnetfunda
[Administrator]

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

Posted by: Rajendra.prasad on: 5/8/2011 [Member] Starter | Points: 25

Up
0
Down
Mr. Vuyiswa Maseko,
thanks for your concern. this question is raised by me not for developing an application, rather it was asked to me in an interview.

Regards,
Rajendra

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

Login to post response