المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Adding The Data To The TextBoxes That Returned From SqlQuary



C# Programming
04-27-2009, 04:19 AM
I'm sending a quary to sql database.I have tryed this whit DataReader, DataAdapter and BindingSources.I'm adding the data returned from the quary to a list box.So far everything is ok.But I can't add an item from the listBox I filled with DataAdepter or Reader.

When I tried DataReader selectedItem and SelectedIndex of listBox gets Null value.
When I tried DataAdapter and DataSet selectedItem of listBox gets System.DataRow.View or something like that I cant remember the full text now.

I tried every way that I found in internet to grab data from a sql data base.

Is there anyone can explain this??