dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online MembersNIRVANA
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » .NET »

Problem dealing with stored procedure


Posted Date: 03 Jun 2009      Posted By:: sundar     Member Level: Silver    Member Rank: 0     Points: 1   Responses: 2



Hi all

i have a table in databse containing 1 column as TotalExperience.
And in my UI part i have 2 dropdowns as Year and Month.

I need to pass both dropdowns selected item to stored procedure to insert in table as TotalExpirience

My problm is..

how can i pass two arguments to 1 storedprocedure to insert in 1 column in database..


plz anyone suggest....




Responses

#384947    Author: Narendra Reddy vajrala      Member Level: Gold      Member Rank: 163     Date: 03/Jun/2009   Rating: 2 out of 52 out of 5     Points: 2

what is that field type?
if varchar then concatinate those two dropdowns and send as a single parameter

otherway is to store in months
convert first your years dropdown selected value to months
months = convert.toint32(ddlyear.seletedvalue)*12 + convert.toint32(ddlmonth.selectedvalue);

pass this months to your stored procedure

--Naren
----------
Jai Sri Ram



 
#384987    Author: Vikranth Reddy      Member Level: Bronze      Member Rank: 0     Date: 03/Jun/2009   Rating: 2 out of 52 out of 5     Points: 2

pass two parameters to stored procedure

and
there you can convert the years into months
ex:

if you are passing two parameters
@Years NVARCHAR(200)
@Months NVARCHAR(200)


SET @months = @Years *12 + @Months

pass @months into database fields



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Exceptions thrown by a method
Previous : How to split the string which is enclosed with quotes
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.