tags:

views:

54

answers:

2

I have a table that possesses ForeignKeys In this code below that am using only the columns of the table informed in the parameter is return

public DataSet Store_RefreshData(string Table){
        Query q = new Query(Table);
        return q.ExecuteDataSet();
}

Precise to come back a field "descricao" of the related table using a SubSonic.Query.

+1  A: 

You'll have to write a stored procedure, then call it like so:

var db = new NorthwindDB();
StoredProcedure sproc = db.ListProductsWithSuchAndSuch();
DataSet results = sproc.ExecuteDataSet();
John Sheehan
A: 

The problem of creating a stored procedure is that this method will be used for many tables.

It would like to pass only the name of the table and the method return all the fields of the table and also the fields of the tables related her.

Leandro