data reader or data set?

mickey

Member
Joined
Nov 26, 2002
Messages
6
how can i display data from 3 columns into 1 textbox and user can view each record separetely (eg using next and back) . should i use data reader or data set? the first column has the date, second column for name and third column for data. i need to display it like this:

12/2/1980
username
any data...

any idea anyone??

thank you.
 
Last edited by a moderator:
Definitely DataSet since you want paging.

Youll need to hook up the BindingContext object on the Form to get the Next/Prev. Check out the help.

To get the text formatted from 3 fields, youve got a few options. I cant really tell you which is best, so here they all are:
1. Use the Parse/Format events combined with DataBinding so that the text goes straight into the TextBox.
2. In your Next/Prev button when you change the Position property, combine the 3 fields manually using string concatenation into the one string field.
3. Add an expression column to your dataset to put all 3 fields together into one. Then you can use either direct data binding to the textbox or shove in the one value manually.

-nerseus
 
Do you need help with DataSets, moving forward/next, binding, ...? There are a lot of possible answers :)

If you need sample code for DataSets, look at just about any post in this forum - there is a ton of sample code. For anything else, just ask.

-Nerseus
 
Back
Top