I'm currently using the dataAdapter.Fil l 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? 3 1439
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******** ******@TK2MSFTN GP09.phx.gbl... I'm currently using the dataAdapter.Fil l 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?
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.Fil l 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?
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*********@No Spam.gmail.com> wrote in message
news:Os******** ******@tk2msftn gp13.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******** ******@TK2MSFTN GP09.phx.gbl... I'm currently using the dataAdapter.Fil l 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?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Job Lot |
last post by:
Is there anyway of Joining two or more DataTable with similar structure?
I have three DataTables with following structures
Data, AmountB/F, Repayments, InterestCharged and AmountC/F
i want to join these tables on the basis of Date. I don't want three rows for each date, i want the values to be added for similar dates.
thanx
|
by: James |
last post by:
Can anyone please shed some light on the following...
I have a framework that uses dynamically created tables, named using an
incremental "attribute set ID", as follows:
attrdata_1
attrdata_2
attrdata_3
etc, etc...
|
by: Shaggy Dragon |
last post by:
Hi there, been looking for a solution to this for some time now. I've
a UNION query that produces a table called AllSecurities:
SELECT SecurityNumber, Book AS AllSecurities FROM Trades UNION
SELECT SecurityNumber, Book from Positions;
I'd really like to show is all the fields from the Positions table,
but these don't exist in the Trades table, so they can't be included
in the UNION (as far as I know). Is it possible to link this to a:
|
by: VMI |
last post by:
In my datatable, I'm retrieving three fields from an Access table and I
concatenate them into one string. Then I put this information in another
datacolumn that I added to the datatable (with DataColumn.Expression).
Unfortunately, when one's a Null, apparently it makes the whole string a
Null and that's what's seen in the grid.
This is what I use:
DataColumn col_input = new DataColumn("Input");
col_input.DataType =...
|
by: Steve C |
last post by:
Hi,
I'm having problems constructing a nested join. It's quite complex, so
here's a simplfied example of the problem. Any thoughts on what I'm
doig wrong - or if I've got the whole approach wrong are welcome.
I've two tables :-
one is a contact table contacting name, addresses etc. Three of the
fields represent users - 'created by', 'last modified by' and 'owner'.
| |
by: Reader |
last post by:
Hello all,
I am joining two tables in a query and the output should be all those
records where two fields in table1 match two corresponding fields in
table2.
I joined the tables using both fields in design view and the Select
statement in SQL view looks good. The query runs perfectly and shows
the result I want but when I save the query and close it, re-opening in
design view shows the error message "Microsoft Office Access can't
|
by: Cyprus106 |
last post by:
Apparently, Im incapable of properly executing this query! I've been at this for far too long and gotten nowhere. Forgive me if this is a umb mistake; I'm not great at SQL.
I've got three tables, MASTER, RETAIL, and AUDIT... MASTER and RETAIL have the same fields, except each record has a unique ITEMNO, and master's numbers are positive and retail's are negative. AUDIT contains some of both table's item numbers in it. I just want to join...
|
by: nickvans |
last post by:
Hello everyone,
I am new to SQL Server, and am having trouble joining several SELECT statements together.
I have three SQL Select statements that do separate count operations to get the status of many projects. (One statement counts the number of open projects, one counts the number of completed projects, and the third one counts the number of late projects.) The count operations use GROUP BY project to operate.
An example of one of...
|
by: fran7 |
last post by:
Hi, I wonder if there is a solution to this. I have asked this before but still not sure of what to do.
I have two access databases, one old and one new. I need to transfer all the records from the old one to the new one. The trouble is the old one does not have a three field that the new one has. They are Password, PasswordEncrypted, PasswordKey. These are required fields and of course generated by some code in the admin section so i need to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |