Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid problem

Status
Not open for further replies.

stevenr

Technical User
Feb 21, 2001
89
0
0
GB
I have a datagrid and wish to display data from 2 tables called name and appnum.
How can I get my datagrid to show the relevant number with the relevant name?

In name I have firstname, companyname and the appnum table has appnum which links back to companyname.

 
i suggest you join the tables in your query and returning one resultset to a table in a dataset which can be bound to the datagrid.

the SQL will be in the form

select * from name
inner join appnum on companyname = appnum

(NOTE: an inner join will only return results where both tables have a matching record)

hope this helps

Rob



------------------------------------

On with the dance! let joy be unconfined;
No sleep till morn, when Youth and Pleasure meet
To chase the glowing hours with flying feet.
-Byron

------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top