By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

joining three fields into one???

P: n/a
VMI
I'm currently using the dataAdapter.Fill method to fill my dataset with data
from an Access DB. My dataset will contain a table with three fields from
Access. In my datagrid (for user interaction), I need to join the data from
these 3 cols into a temporary datacolumn. I can't add this additional
column in the Access table because I'll be duplicating data so I was
thinking of creating a datacolumn in runtime and looping through the filled
datatable. Is there any way to fill this temporary datacolumn without having
to loop through the datatable?

Any suggestions?
Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You are on the right track. Create a new DataColumn, add it to the column's
collection and just set its Expression property to the concatenated value of
the three other columns. If you look in the article below, I actually
concenate three fields together so you can just substitute your column names
for mine.
http://www.knowdotnet.com/articles/dataviews1.html

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"VMI" <vo******@yahoo.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
I'm currently using the dataAdapter.Fill method to fill my dataset with data from an Access DB. My dataset will contain a table with three fields from
Access. In my datagrid (for user interaction), I need to join the data from these 3 cols into a temporary datacolumn. I can't add this additional
column in the Access table because I'll be duplicating data so I was
thinking of creating a datacolumn in runtime and looping through the filled datatable. Is there any way to fill this temporary datacolumn without having to loop through the datatable?

Any suggestions?

Nov 16 '05 #2

P: n/a
Just a thought,

If you use SQL against the Access db, you can do it on the backend. I know
very little about Access, but I have build SQL queries (in Access) that have
done what you want.

This might be a preferred solution since you won't have to do any manual
manipulation of the grid in code.

The downside of this approach is that this is a read only solution (the
combination is done at the Access level). If you want the column to be
automatically updated when changes are made to the other fields, then you
will have to make a column that is computed.
"VMI" wrote:
I'm currently using the dataAdapter.Fill method to fill my dataset with data
from an Access DB. My dataset will contain a table with three fields from
Access. In my datagrid (for user interaction), I need to join the data from
these 3 cols into a temporary datacolumn. I can't add this additional
column in the Access table because I'll be duplicating data so I was
thinking of creating a datacolumn in runtime and looping through the filled
datatable. Is there any way to fill this temporary datacolumn without having
to loop through the datatable?

Any suggestions?

Nov 16 '05 #3

P: n/a
VMI
Thanks, it worked. I thought I was going to have to create a separate column
in Access.
I read your profile and I noticed that you've also worked with macromedia
Flash. I'm a free-lance Windows software consultant and I have a friend
that's interested in creating some sites that include Flash content in them.
He's thinking of hiring a company that works with web design
(www.itacon.com) and they've made pages such as:
http://www.cesaravargas.com/home.html
http://www.clavellassociates.com/Clavell_1024.html
http://www.ewirelesspr.com/

so I want to learn how to build Flash content similar to the one in those
pages . Do you recommend any books or sites that'll help with making this
type of Flash? I assume that these sites aren't really so complicated, so
I'd prefer not to have to program in Actionscript (I already have a bunch of
programming languages in my head, I don't think I can handle another one).
Or would you suggest using another tool (maybe Swish)?

Thanks for your input.
"W.G. Ryan eMVP" <Wi*********@NoSpam.gmail.com> wrote in message
news:Os**************@tk2msftngp13.phx.gbl...
You are on the right track. Create a new DataColumn, add it to the
column's
collection and just set its Expression property to the concatenated value
of
the three other columns. If you look in the article below, I actually
concenate three fields together so you can just substitute your column
names
for mine.
http://www.knowdotnet.com/articles/dataviews1.html

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"VMI" <vo******@yahoo.com> wrote in message
news:u1**************@TK2MSFTNGP09.phx.gbl...
I'm currently using the dataAdapter.Fill method to fill my dataset with

data
from an Access DB. My dataset will contain a table with three fields
from
Access. In my datagrid (for user interaction), I need to join the data

from
these 3 cols into a temporary datacolumn. I can't add this additional
column in the Access table because I'll be duplicating data so I was
thinking of creating a datacolumn in runtime and looping through the

filled
datatable. Is there any way to fill this temporary datacolumn without

having
to loop through the datatable?

Any suggestions?


Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.