Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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:29pm
Edited 10-Oct-12 19:51pm
v2
Comments
Al Moje at 10-Oct-12 22:46pm
   
Could you post your code snippet you had been made?
Wes Aday at 10-Oct-12 22:50pm
   
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 at 10-Oct-12 22:51pm
   
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 at 11-Oct-12 1:37am
   
Use join clause in your query to join both table and then display that table in your page

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
0 OriginalGriff 380
1 Gihan Liyanage 198
2 Sergey Alexandrovich Kryukov 150
3 ChauhanAjay 120
4 BotCar 105
0 Sergey Alexandrovich Kryukov 9,056
1 OriginalGriff 7,981
2 CPallini 2,613
3 Richard MacCutchan 2,121
4 Abhinav S 1,928


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100