locked
Urgent: Data Access Block with tonn of parameters RRS feed

  • Question

  • User1701481720 posted
    Hi, I am trying to use Data Access Application Block with Stored procedure with tonn of parameters? I have heard that stored proc parameters can be automatically built? how? please help me with some sample code is really appreciated. Thanks in advance -hs
    Tuesday, August 17, 2004 12:30 AM

All replies

  • User241098857 posted
    How many is a ton? Why would there be a problem with using a ton of parameters? Public Shared Function AddUserInfo(ByVal user As User) As String Dim strSQL As String = "Approval_Add_User" SqlHelper.ExecuteNonQuery(ConfigurationSettings.AppSettings("connString"), CommandType.StoredProcedure, _ strSQL, _ New SqlParameter("@Approvalby", user.FullName), _ New SqlParameter("@WindowsLogin", user.windowsLogin), _ New SqlParameter("@Password", user.Password), _ New SqlParameter("@Firstname", user.FirstName), _ New SqlParameter("@Lastname", user.LastName), _ New SqlParameter("@Email", user.emailAddress), _ New SqlParameter("@Title", user.Title), _ New SqlParameter("@GMInitials", user.GMSalesInitials), _ New SqlParameter("@PriorityApp", user.priorityApp), _ New SqlParameter("@Receiving", user.Receiving), _ New SqlParameter("@CSQuote_Preparer", user.CSQuotePreparer), _ New SqlParameter("@CSQuote_SalesApprove", user.CSQuoteSalesApprove), _ New SqlParameter("@CSQuote_PMApprove", user.CSQuotePMApprove), _ New SqlParameter("@NWQuote_Preparer", user.NWQuotePreparer), _ New SqlParameter("@NWQuote_SalesApprove", user.NWQuoteSalesApprove), _ New SqlParameter("@NWQuote_PMApprove", user.NWQuotePMApprove), _ New SqlParameter("@FLQuote_Preparer", user.FLQuotePreparer), _ New SqlParameter("@FLQuote_SalesApprove", user.FLQuoteSalesApprove), _ New SqlParameter("@FLQuote_PMApprove", user.FLQuotePMApprove), _ New SqlParameter("@ThreeDQuote_Preparer", user.ThreeDQuotePreparer), _ New SqlParameter("@ThreeDQuote_SalesApprove", user.ThreeDQuoteSalesApprove), _ New SqlParameter("@ThreeDQuote_PMApprove", user.ThreeDQuotePMApprove), _ New SqlParameter("@TRTQuote_Preparer", user.TRTQuotePreparer), _ New SqlParameter("@TRTQuote_SalesApprove", user.TRTQuoteSalesApprove), _ New SqlParameter("@TRTQuote_PMApprove", user.TRTQuotePMApprove), _ New SqlParameter("@Review", user.Review), _ New SqlParameter("@Sales", user.Sales), _ New SqlParameter("@ProductMgr", user.ProductManager), _ New SqlParameter("@OrderPerPO", user.OrderPerPO), _ New SqlParameter("@InPilot", user.InPilot), _ New SqlParameter("@Accounting", user.Accounting), _ New SqlParameter("@UCCReqd", user.UCCRequired), _ New SqlParameter("@Engineering", user.Engineering), _ New SqlParameter("@Purchasing", user.Purchasing), _ New SqlParameter("@PLVPCT", user.ProductLineVPCT), _ New SqlParameter("@PLVPCS", user.ProductLineVPCS), _ New SqlParameter("@Production", user.Production), _ New SqlParameter("@Packaged", user.Packaged), _ New SqlParameter("@Repair", user.Repair), _ New SqlParameter("@ReadyToShip", user.ReadyToShip), _ New SqlParameter("@Shipment", user.Shipment), _ New SqlParameter("@FinalInvoice", user.FinalInvoice), _ New SqlParameter("@OrderComplete", user.OrderComplete), _ New SqlParameter("@SSADist", user.SSADist), _ New SqlParameter("@Purch", user.PurchasingProduction), _ New SqlParameter("@VPOps", user.VPOps), _ New SqlParameter("@President", user.President), _ New SqlParameter("@Inspect", user.Inspect), _ New SqlParameter("@Lab", user.Lab), _ New SqlParameter("@RevBilling", user.RevApproveBilling)) End Function
    Monday, August 30, 2004 11:01 AM