JoeBalberde Posted November 30, 2005 Posted November 30, 2005 Hello all, I have to problems that i can not seem to overcome in my current project. 1. Runtime datasource, dislplaymember, valuemember of a list box 2. In using oledb with apropriate data adapters and datasets and putting certain information into variables 1. Ok here is the code i am using: CustDataAdapter.Fill(cust1) lstChoice.DataSource = Cust1 lstChoice.ValueMember = "id" lstChoice.DisplayMember = "Name" This is using a dataset named cust1 with two fields named id and name. It works fine if i use the property options and set it up before i run. But this refuses to work, What am i doing wrong? I am going to be doing this several times in the app so setting it in the property options will not do. 2. I have another dataadapter with a select statement that is pulling up other information from the cust table depending on the valuemember of the previous listbox. I have setup the dataadapter with the appropriate sql to pull out what i need. My only problem is i don't know how to take the information it gives and put it into a variable. I do fine putting it into datagrids or listboxes (setting up from property options). I can not figure out how to put them into variables. Thanks a ton Joe Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.