Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 28th, 2006, 02:32 AM
Authorized User
 
Join Date: Mar 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to Relate Tables in ASP .NET

In ASP.net how do I relate tables. I am using Connection, Command and DataReader classes, is it possible to relate tables. OR if I use DataSet Class, is it possible to relate tables.

Basically, I want to get the result on a data grid for the Select Statment like
"SELECT T1.NAME, T2.DEPARTMENT FROM EMPLOYEES T1, DEPARTMENTS T2 WHERE T2.DEPARTMENTID = T1.DEPARTMENTID"

How do I do this ?

:(

 
Old March 28th, 2006, 06:02 AM
Authorized User
 
Join Date: Aug 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ya it is possible , You will use the CommandText method.
It is very useful for you.

Regards
Adalarasu. S

 
Old March 28th, 2006, 09:18 AM
Authorized User
 
Join Date: Mar 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you arasu. How do I use commandtext method. If I call a procedure from my application, how will I get the result of the query back to the dataset

 
Old March 28th, 2006, 02:02 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

run the sql statment as you have it, or use a stored procedure. not sure what your question is

 
Old March 29th, 2006, 01:25 AM
Authorized User
 
Join Date: Mar 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I shall explain what I need, excuse me if my query is too primitive. From ASP .net application I want to run a stored procedure and get the result into a datagrid in the application. How will I do it ?






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to relate tables in ASP .NET busybee BOOK: ASP.NET Website Programming Problem-Design-Solution 1 April 2nd, 2006 04:36 PM
Using two tables in ASP tanishast1 Access ASP 1 October 16th, 2005 02:08 PM
how query 2 tables in asp method Classic ASP Databases 5 March 19th, 2005 12:24 PM
how to query 2 tables in asp.net method ASP.NET 1.0 and 1.1 Basics 3 March 18th, 2005 04:35 PM
How to relate a double indexed table? izz SQL Server 2000 1 August 18th, 2003 06:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.