Join Tables without DataRelation

S

Steve Bishop

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
 
I

Ignacio Machin \( .NET/ C# MVP \)

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,
 
S

Steve Bishop

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top