Click here to Skip to main content
15,880,608 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SqlDataAdapter dmt = new SqlDataAdapter("select * from PartsInfoRetreive('" + this.comboBoxDesc.SelectedValue + "')", con);

DataSet smt = new DataSet();
dmt.Fill(smt, "qty");

DataView vmkt = new DataView(smk.Tables["qty"]);
txtIdentifica.Text = vmkt[0]["description"].ToString();
txtPartNo.Text = vmkt[1]["description"].ToString();
txtMark.Text = vmkt[2]["description"].ToString();
txtModel.Text = vmkt[3]["description"].ToString();
txtQuality.Text = vmkt[4]["description"].ToString();
Posted
Updated 10-Oct-12 2:18am
v2
Comments
sahabiswarup 10-Oct-12 7:48am    
write your code inside try catch block so that you can handle this type of exception.
Richard MacCutchan 10-Oct-12 7:53am    
You should check the return code(s) from your method calls to see whether they succeeded, and if so, how many items were returned.
ZurdoDev 10-Oct-12 8:19am    
Check your row count first.

1 solution

DataView vmkt = new DataView(smk.Tables["qty"]);


check the dataset name instead of smt u wrote smk thats the error

DataView vmkt = new DataView(smt.Tables["qty"]);
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900