<p>I am building a web page to show a customer what software they purchased and to give them a link to download said software.  Unfortunately, the data on what was purchased and the download information are in separate databases so I can't just take care of it with joins in an SQL query.</p>

<p>The common item is SKU. I'll be pulling a list of SKUs from the customer purchases database and on the download table is a comma delineated list of SKUs associated with that download. My intention, at the moment, is to create from this one datatable to populate a <code>GridView</code>.</p>

<p>Any suggestions on how to do this efficiently would be appreciated. If it helps, I can pretty easily pull back the data as a <code>DataSet</code> or a <code>DataReader</code>, if either one would be better for this purpose.</p>

[{'answer_id': 2283, 'author': 'Vaibhav', 'author_id': 380, 'author_profile': 'https://Stackoverflow.com/users/380', 'pm_score': 0, 'selected': False, 'text': '<p>I am thinking off the top of my head here. If you load both as Data Tables in the same Data Sets, and define a relation between the two over SKU, and then run a query on the Data Set which produces the desired result.</p>\n'}, {'answer_id': 2324, 'author': 'Yaakov Ellis', 'author_id': 51, 'author_profile': 'https://Stackoverflow.com/users/51', 'pm_score': 2, 'selected': False, 'text': '<p>As long as the two databases are on the same physical server (assuming MSSQL) and the username/password being used in the connection string has rights to both DBs, then you should be able to perform a join across the two databases. Example: </p>\n\n<pre><code>select p.Date,\n       p.Amount,\n       d.SoftwareName,\n       d.DownloadLink\nfrom   PurchaseDB.dbo.Purchases as p\njoin   ProductDB.dbo.Products as d on d.sku = p.sku\nwhere  p.UserID = 12345\n</code></pre>\n'}, {'answer_id': 2346, 'author': 'Brett Veenstra', 'author_id': 307, 'author_profile': 'https://Stackoverflow.com/users/307', 'pm_score': 2, 'selected': False, 'text': "<p>Why not create a Domain object based approach to this problem:</p>\n\n<pre><code>public class CustomerDownloadInfo\n{\n    private string sku;\n    private readonly ICustomer customer;\n\n    public CustomerDownloadInfo(ICustomer Customer){\n        customer = Customer;\n    }\n\n    public void AttachSku(string Sku){\n        sku = Sku;\n    }\n\n    public string Sku{\n        get { return sku; }\n    }\n\n    public string Link{\n        get{    \n            // etc... etc...          \n        }\n    }\n}\n</code></pre>\n\n<p>There are a million variations on this, but once you aggregate this information, wouldn't it be easier to present?</p>\n"}]
['https://Stackoverflow.com/questions/2267', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/111/']