error on sql select query

Posted by Shijohnjoseph under ASP.NET category on | Points: 40 | Views : 2093
i have written a query for selecting the column names with registrationid as foriegn key this is receipt form so i need to add the registrationid at several times but this is my primarykey of personnal details table so
when i am selecting the field its not taking any values and displaying null

this is my procedure

CREATE procedure viewfeestudentinfo

@registrationid varchar(50)

select distinct studentname,department,totalfee from studentfeedetails where registrationid=@registrationid
this is my code behind action

panelfeeview.Visible = true;
DataSet ds = new DataSet();
ds = class1.viewfeestudentinfo(txtfeeregid.Text.ToString());
txtfeename.Text = ds.Tables[0].Rows[0][0].ToString();
dropfeedep.SelectedItem.Text = ds.Tables[0].Rows[0][1].ToString();
txttotalfee.Text = ds.Tables[0].Rows[0][2].ToString();
Button1.Visible = false;

Comments or Responses

Posted by: Dotnetfundakumar on: 2/11/2011 Level:Starter | Status: [Member] | Points: 10

working well this Query

try this

Exec viewfeestudentinfo C100
Posted by: Shijohnjoseph on: 2/11/2011 Level:Starter | Status: [Member] | Points: 10
hi ,
where i can give this code and what is the use of it sir

Login to post response