Click here to Skip to main content
Sign Up to vote bad
good
See more: C#ASP.NET
Help... I am a novice and have been tasked to create a dB. I have created SQL Sewrver Tables and a web project. I need help diplaying information from two tables into 1 web form without haveing to use paging. There is only 1 row in 1 table and many rows in the 2nd table. I have created a form and it is working but I have to page to see all the data from the 2nd table.
Posted 10 Oct '12 - 16:29
Edited 10 Oct '12 - 19:51

Comments
Al Moje - 10 Oct '12 - 22:46
Could you post your code snippet you had been made?
Wes Aday - 10 Oct '12 - 22:50
Okay.... so what specific question related to a specific programming problem do you have? Connect to the database, query the information and display it. What is the problem?
Sergey Alexandrovich Kryukov - 10 Oct '12 - 22:51
Sewer is where the dirty stuff goes, Server is something which server, but what's "Sewrver"? "diplaying"? "haveing"? "datga"? Your English is not that bad to be an excuse. Having such a basic thing as spellchecker is a matter of mere politeness, and it would be free. --SA
Dinesh Ambaliya - 11 Oct '12 - 1:37
Use join clause in your query to join both table and then display that table in your page

1 solution

You can use inner join in your sql query to select records from both tables.
Try something like following statement :
 
select table1.*,table2.*
from table1
inner join table2 on table1.Column1 = table2.Column1
where table1.Column1 = SomeValue
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 253
1 Rohan Leuva 220
2 Sergey Alexandrovich Kryukov 172
3 Abhinav S 168
4 Mahesh Bailwal 165
0 Sergey Alexandrovich Kryukov 8,494
1 OriginalGriff 6,799
2 CPallini 3,603
3 Rohan Leuva 2,923
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 11 Oct 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid