473,756 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help constructing a database-type view from a DataSet object

I have a DataSet where two tables have a relation (the
parent / child relationship is also successfully added to
the DataSet Relations collection). I am looking for a
way to programmaticall y construct something analogous to
a database view where the record (or row) would show
table1.Field1, table1.field2, table2.Field2, etc.

I tried using a DataView object, but this appears to
allow only filtering and sorting.

Does anyone know how to crate such a view from DataSet
tables and relations?

Gary

Nov 20 '05 #1
3 1473

Really, I would expect you to do this in your query using a join resulting
in a single table.
OHM

Gary wrote:
I have a DataSet where two tables have a relation (the
parent / child relationship is also successfully added to
the DataSet Relations collection). I am looking for a
way to programmaticall y construct something analogous to
a database view where the record (or row) would show
table1.Field1, table1.field2, table2.Field2, etc.

I tried using a DataView object, but this appears to
allow only filtering and sorting.

Does anyone know how to crate such a view from DataSet
tables and relations?

Gary


Regards - OHM# OneHandedMan{at }BTInternet{dot }com
Nov 20 '05 #2

OHM

I have a project-related constraint not allowing me use a
join within an SQL statement. Specifically, my lookup
tables are stored in an XML file which are read into a
DataSet. I use an SQL statement to select records from
SQLServer and add those records into a Table within the
DataSet.

So, do you have ideas on how I might accomplish this task?
-----Original Message-----

Really, I would expect you to do this in your query using a join resultingin a single table.
OHM

Gary wrote:
I have a DataSet where two tables have a relation (the
parent / child relationship is also successfully added to the DataSet Relations collection). I am looking for a
way to programmaticall y construct something analogous to a database view where the record (or row) would show
table1.Field1, table1.field2, table2.Field2, etc.

I tried using a DataView object, but this appears to
allow only filtering and sorting.

Does anyone know how to crate such a view from DataSet
tables and relations?

Gary


Regards - OHM# OneHandedMan{at }BTInternet{dot }com
.

Nov 20 '05 #3
ermm. There is something similar that you can do with the bindings on a pair
of datagrids where you can point the datasource for the second grid to the
relation. This has the effect of an Order/Order Details display for grid one
and two so if you click on the order the details are displayed in the bottom
without any coding at all.

Perhaps this functionality could be leveraged to acomplish what you are
trying to do. I dont think there is a direct way to do this, having said
that, it probably would be wise to post this to the adonet newsgroup where
people answer questions like this all the time, someone may have done this.
If so please come back and let us know what the solution was.

Regards - OHM

an*******@discu ssions.microsof t.com wrote:
OHM

I have a project-related constraint not allowing me use a
join within an SQL statement. Specifically, my lookup
tables are stored in an XML file which are read into a
DataSet. I use an SQL statement to select records from
SQLServer and add those records into a Table within the
DataSet.

So, do you have ideas on how I might accomplish this task?
-----Original Message-----

Really, I would expect you to do this in your query using a join
resulting in a single table.
OHM

Gary wrote:
I have a DataSet where two tables have a relation (the
parent / child relationship is also successfully added to
the DataSet Relations collection). I am looking for a
way to programmaticall y construct something analogous to
a database view where the record (or row) would show
table1.Field1, table1.field2, table2.Field2, etc.

I tried using a DataView object, but this appears to
allow only filtering and sorting.

Does anyone know how to crate such a view from DataSet
tables and relations?

Gary


Regards - OHM# OneHandedMan{at }BTInternet{dot }com
.


Regards - OHM# OneHandedMan{at }BTInternet{dot }com
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2937
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with a device. The definition of the table is as follows: CREATE TABLE devicedata ( device_id int NOT NULL REFERENCES devices(id), -- id in the device
2
405
by: Neil | last post by:
Hello I would appreciate if someone could help me with this query. I have an access database and am using ASP/VB. I have a table called 'booking' which contains the following fields: bookID (autonumber) startdate (date) room (text)
8
1587
by: Dynamo | last post by:
Hi again, I am constructing a site on a small scale where people can buy nik naks and pay for them via paypal. Everything works fine unless there is only one of an item left for sale. What if 2 people try to buy this item at the same time? I have partially overcome this problem by adding an extra column called status to my catalogue table. When somebody tries to buy the item I have created an interim page where the user is asked to confirm...
6
1242
by: Big George | last post by:
Hello, I develop in ASP.NET with VB.NET code. I need some help constructing a class: Worker. I'm designing the properties of this class. The class is filled reading tables in database. Properties of Class Worker: - ID_Card
4
2970
by: perryschon | last post by:
Can someone please help me out with the Visual Basic source code needed that allows configuration and usage of comm ports in any PC? I am constructing an asynchronous serial communication RS-232 circuit which will include serial cables (transmitter and receiver) connected from one pc to another pc with a 9-pin null modem in between. The VB program will be used to input the data and the output will appear on the remote PC. I need help in...
0
9456
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
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,...
0
10034
Oralloy
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...
1
9843
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,...
0
8713
agi2029
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...
0
6534
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();...
0
5142
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...
2
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.