Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8315273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:05:42+00:00 2026-06-08T21:05:42+00:00

this is a part of my Stored Procedure : Create procedure sp_Units_GetUnitState @PadidehOrAtkinsCode int

  • 0

this is a part of my Stored Procedure :

Create procedure sp_Units_GetUnitState  
@PadidehOrAtkinsCode int  
as
    Select State from Units where ID = @PadidehOrAtkinsCode  
go  

I have a DataSet (.XSD) file which has my StoredProcedure (named GetDataBy1 here)
enter image description here
I pass the parameter like this :

odsUnit.SelectParameters["PadidehOrAtkinsCode"].DefaultValue =  
txtPadidehOrAtkinsCode.Text;  

Now I want to fill my textbox Text property with the State field I had in my stored procedure, what should I do to get the value from osdUnit?
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:05:43+00:00Added an answer on June 8, 2026 at 9:05 pm

    Create an object of your stored procedure and call the GetData function. No need to assign select parameters to your objectdatasource. Follow below example: I assumed your dataset name is dataset1.

    DataTable dt1 = new DataTable();  // for temporary storage
    DataSet1TableAdapters.sp_Units_GetUnitState  objAda = new DataSet1TableAdapters.sp_Units_GetUnitState();
    dt1 = objAda.GetData(txtPadidehOrAtkinsCode.Text);
    
    // Now get the state from the datatable
    string state = dt1.Rows[0][0].ToString();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a big t-sql stored procedure with this part that i am concerned
I'm having problems with stored procedures, this part to me more specific : CREATE
This was resolved. The statement was in another part of the stored procedure. The
This is two part question: I have two stored procedures: sp1 & sp2. If
I have this part of script from my GAE application which uses webapp2, which
This is a multi-part question. I have a table similar to: CREATE TABLE sales_data
select * from dbo.split(RTRIM(@importRow), '¬') gives error: Msg 102, Level 15, State 1, Procedure
This is the stored procedure I'm using to get 5 digits from an xml:
Based on this previous question on stackoverflow: Fetch Oracle table type from stored procedure
I have a stored procedure that returns a valueI call it from other stored

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.