Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...