Wrox Programmer Forums
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 July 27th, 2007, 03:49 AM
Registered User
Join Date: Jul 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Related DataTables vs Linked Servers


I'm trying to build a report in an ASP.NET 2.0 application. I have 2 datasources that I am trying to combine (JOIN) to produce the rows for the report. One datasource is completely under my control in a local SQL Server 2005 database. The other is a ISAM data source accessed via a 3rd party ODBC driver over virtual connection. I have little or no control over this second source and am limited to read-only (not a problem for creating reports). Records in my SQL Server database may have a corresponding record in the ISAM database, and if so, I want to present columns from each in a homogenous report. So here's my question: is it better to use two DataTables, one for each datasource, and joined using a System.Data.DataRelation within ASP.NET, or better to use a linked server in SQL Server so that I can use a stored proc to perform a SQL JOIN on the data? I've tried a test using both and can't see much performance difference using WAS. I'm not very familiar with linked servers, so are there any pitfalls to look out for or obvious advantages with either approach?

Any help much appreciated.


Old August 2nd, 2007, 07:09 AM
Friend of Wrox
Join Date: Feb 2006
Posts: 133
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gaurav_jain2403

I cannot help you much, but the drawback of using datarelation in your asp.net code is that if there is any redundancy in the column you take as primary key of primary table, it will give runtime error. Also, if foreign key contains some data which is not there in primary key of primary table, again runtime error will occur. If you use Join (either left join or inner join acording to requirement) in Stored procedure, this problem can be sorted out.

I dont know which has better performance and which is better.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked Servers anothervbaddict SQL Server 2000 5 November 30th, 2007 07:31 AM
LINKED Servers. WebLadyBug SQL Server 2005 1 April 9th, 2007 01:27 AM
Linked Servers rklio SQL Server 2005 0 February 5th, 2007 12:00 PM
Linked Servers msrnivas .NET Web Services 1 January 8th, 2005 09:27 AM
linked servers msrnivas General .NET 1 November 26th, 2004 01:19 AM

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