Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TableAdapter to return only selected columns.
Message
From
30/03/2009 11:19:04
 
 
To
All
General information
Forum:
ASP.NET
Category:
ADO.NET
Title:
TableAdapter to return only selected columns.
Miscellaneous
Thread ID:
01392118
Message ID:
01392118
Views:
128
(VS2008) I'm trying to configure a TableAdapter in a Typed DataSet to return only a certain subset of columns from the main schema of the table on which it is based, but it always returns the entire schema (all columns) with blank values in the columns I have omitted.

The TableAdpater has the default Fill and GetData() methods that come from the wizard, which contain every column in the table, which is fine. I then added a new parameterized query method called GetActiveJobsByCustNo(CustNo), and I only included a few columns in the SQL query that I actually want to be in this table view.

But, again, it returns all the columns in the master table schema, with empty values for the columns I omitted.

The reason I am wanting this, is so I can just get a few columns back to use that table view with AutoGenerateColumns in an ASP.NET GridView. With it giving me back EVERY column i nthe schema, my presentation GridView contains way more columns that I want to show th user. And, I want to avoid have to declare the columns in the GridView.
Next
Reply
Map
View

Click here to load this message in the networking platform