473,396 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Join Tables without DataRelation

I am use to working with only single tables with my command object. Now
I have 2 tables that need a 1 to 1 relationship. Is it possible to inner
join 2 tables in my SQL statement before thowing the data into the
DataSet?? I'm trying to avoid the DataRelation object.

Also, all the examples I have show using the data grid and no form
fields to display data. I would like to read some of the records into
Web Server controls like text boxes. Example appreciated. Thanks.
Steve

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
3 2451
Hi Steve,

Are you going to do so in the SQL layer?

IF so you can do something like SELECT TABLE1.* , TABLE2.* FROM TABLE1,
TABLE2 WHERE table1.ID = table2.ID
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Steve Bishop" <st****@viper.com> wrote in message
news:u5**************@tk2msftngp13.phx.gbl...
I am use to working with only single tables with my command object. Now
I have 2 tables that need a 1 to 1 relationship. Is it possible to inner
join 2 tables in my SQL statement before thowing the data into the
DataSet?? I'm trying to avoid the DataRelation object.

Also, all the examples I have show using the data grid and no form
fields to display data. I would like to read some of the records into
Web Server controls like text boxes. Example appreciated. Thanks.
Steve

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2
Out of curiosity, why don't you want to use a DataRelation, they rock?
"Steve Bishop" <st****@viper.com> wrote in message
news:u5**************@tk2msftngp13.phx.gbl...
I am use to working with only single tables with my command object. Now
I have 2 tables that need a 1 to 1 relationship. Is it possible to inner
join 2 tables in my SQL statement before thowing the data into the
DataSet?? I'm trying to avoid the DataRelation object.

Also, all the examples I have show using the data grid and no form
fields to display data. I would like to read some of the records into
Web Server controls like text boxes. Example appreciated. Thanks.
Steve

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #3
I would like to learn more about it. Unfortunately, some of my
datasource tables dont have a primary key or any constraints assigned on
there way out of their proprietary odbc driver. My SQL inner joins are
working ok for now.

Would like to explore the DataRelation object more when we port some of
these tables to SQL Server.

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4

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

Similar topics

3
by: Peter | last post by:
Hi, I have two datatables and I want to efficiently query the intersection of the two using the studentID. In my example code below, I want to print out Mary and Jane and their exam grades and I...
1
by: Gene Ariani | last post by:
I have one dataset that contains two DataTables: DataTable1: Customer_ID 1
0
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005 and .net 2.0. I have used 2 DirectorySearchers to retrieve Active Directory data and put them into 2 separate dataset tables. I want to create a 3rd dataset table by using the...
2
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005 and .net 2.0 I used 2 DirectorySearchers to retrieve data from Active Directory and placed them in 2 dataset tables. I need to perform the SQL equuvakebt of join operation to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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,...

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.