Join Two Tables from mysql and mssql RRS feed

  • Question

  • User-982924510 posted


    i use vs2010 and c#

    there is a grid with a sqldatasource

    there a table on a mysql server and one table on a mssql server.

    is it possible to join them on sqldatasource ?..

    best regards

    Sunday, October 16, 2011 1:49 PM


  • User-821857111 posted

    The short answer is no.

    You need to query each database separately. You can put the result of each query into its own DataTable within the same DataSet, and create a relationship between them using DataRelations: http://msdn.microsoft.com/en-us/library/ay82azad(v=vs.71).aspx

    The reason this won't work with a SqlDataSource is that the DataSet that the SqlDataSource control generates only holds one DataTable.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, October 16, 2011 3:54 PM