Error: ObjectDataSource 'ObjectDataSource1' could not find a non-generic method 'FillMenusByLocation

D

Dotnet Gruven

I'm trying to use a typed dataset and ObjectDataSource binding to a SQLX db
using a foreign key to filter the returned result set to display in a
GridView.

The error message in the subject line is generated when I try to bind the
following GridView to the ObjectSource that follows and the code that
follows that which is from an ASP.NET form PageLoad:

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DeleteMethod="Delete" InsertMethod="Insert"
SelectMethod="FillMenusByLocation"

TypeName="RestaurantsTableAdapters.MenusTableAdapter"
UpdateMethod="Update">

<DeleteParameters>

<asp:parameter Name="Original_MenuId" Type="Int32" />

</DeleteParameters>

<UpdateParameters>

<asp:parameter Name="LocationId" Type="Int32" />

<asp:parameter Name="MenuName" Type="String" />

<asp:parameter Name="IsAvailable" Type="Boolean" />

<asp:parameter Name="DisplayOrder" Type="Int32" />

<asp:parameter Name="Original_MenuId" Type="Int32" />

</UpdateParameters>

<InsertParameters>

<asp:parameter Name="LocationId" Type="Int32" />

<asp:parameter Name="MenuName" Type="String" />

<asp:parameter Name="IsAvailable" Type="Boolean" />

<asp:parameter Name="DisplayOrder" Type="Int32" />

</InsertParameters>

</asp:ObjectDataSource>
---------------------------------------------------


<asp:GridView ID="MenusGridView" Runat="server"
DataSourceID="ObjectDataSource1" DataKeyNames="LocationId" ShowHeader=True
AutoGenerateColumns="False"
CellPadding="4" ForeColor="#333333" GridLines="Both" >

<Columns>

<asp:BoundField ReadOnly="True" HeaderText="MenuId" DataField="MenuId"
SortExpression="MenuId" Visible=True />

<asp:BoundField ReadOnly="True" HeaderText="LocationId"
DataField="LocationId" SortExpression="LocationId" Visible=True />

<asp:BoundField HeaderText="Name" DataField="MenuName"
SortExpression="MenuName" />

<asp:CheckBoxField HeaderText="Available?" DataField="IsAvailable"
SortExpression="IsAvailable" ItemStyle-HorizontalAlign="Center" />

<asp:BoundField HeaderText="DisplayOrder" DataField="DisplayOrder"
SortExpression="DisplayOrder" />

</Columns>




</asp:GridView>

--------- From Page_Load !IsPostBack

ObjectDataSource1.SelectParameters.Add("@parameter1", TypeCode.Int32,
locationId.ToString());

----------
Here is the XSD for the related TableAdapter


<TableAdapter BaseClass="System.ComponentModel.Component"
DataAccessorName="MenusTableAdapter" Modifier="AutoLayout, AnsiClass, Class,
Public" Name="Menus" WebServiceAttribute="False">

<MainSource>

<DbSource ConnectionRef="ASPNETDBConnectionString (Web.config)"
DbObjectName="dbo.Menus" DbObjectType="Table" EnableWebMethods="False"
FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both"
GeneratePagingMethods="False" GenerateShortCommands="True"
GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object,
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
UseOptimisticConcurrency="False">

<DeleteCommand>

<DbCommand CommandType="Text" ModifiedByUser="False">

<CommandText>DELETE FROM [dbo].[Menus] WHERE (([MenuId] =
@Original_MenuId))</CommandText>

<Parameters>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="Int32" Direction="Input" ParameterName="@Original_MenuId"
Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="MenuId"
SourceColumnNullMapping="False" SourceVersion="Original">

</Parameter>

</Parameters>

</DbCommand>

</DeleteCommand>

<InsertCommand>

<DbCommand CommandType="Text" ModifiedByUser="False">

<CommandText>INSERT INTO [dbo].[Menus] ([LocationId], [MenuName],
[IsAvailable], [DisplayOrder]) VALUES (@LocationId, @MenuName, @IsAvailable,
@DisplayOrder)</CommandText>

<Parameters>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="Int32" Direction="Input" ParameterName="@LocationId" Precision="0"
ProviderType="Int" Scale="0" Size="0" SourceColumn="LocationId"
SourceColumnNullMapping="False" SourceVersion="Current">

</Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="String" Direction="Input" ParameterName="@MenuName" Precision="0"
ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MenuName"
SourceColumnNullMapping="False" SourceVersion="Current">

</Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="Boolean" Direction="Input" ParameterName="@IsAvailable"
Precision="0" ProviderType="Bit" Scale="0" Size="0"
SourceColumn="IsAvailable" SourceColumnNullMapping="False"
SourceVersion="Current">

</Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="Int32" Direction="Input" ParameterName="@DisplayOrder" Precision="0"
ProviderType="Int" Scale="0" Size="0" SourceColumn="DisplayOrder"
SourceColumnNullMapping="False" SourceVersion="Current">

</Parameter>

</Parameters>

</DbCommand>

</InsertCommand>

<SelectCommand>

<DbCommand CommandType="Text" ModifiedByUser="True">

<CommandText>SELECT MenuId, LocationId, MenuName, IsAvailable, DisplayOrder
FROM Menus</CommandText>

<Parameters>

</Parameters>

</DbCommand>

</SelectCommand>

<UpdateCommand>

<DbCommand CommandType="Text" ModifiedByUser="False">

<CommandText>UPDATE [dbo].[Menus] SET [LocationId] = @LocationId, [MenuName]
= @MenuName, [IsAvailable] = @IsAvailable, [DisplayOrder] = @DisplayOrder
WHERE (([MenuId] = @Original_MenuId))</CommandText>

<Parameters>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="Int32" Direction="Input" ParameterName="@LocationId" Precision="0"
ProviderType="Int" Scale="0" Size="0" SourceColumn="LocationId"
SourceColumnNullMapping="False" SourceVersion="Current">

</Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="String" Direction="Input" ParameterName="@MenuName" Precision="0"
ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MenuName"
SourceColumnNullMapping="False" SourceVersion="Current">

</Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="Boolean" Direction="Input" ParameterName="@IsAvailable"
Precision="0" ProviderType="Bit" Scale="0" Size="0"
SourceColumn="IsAvailable" SourceColumnNullMapping="False"
SourceVersion="Current">

</Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="Int32" Direction="Input" ParameterName="@DisplayOrder" Precision="0"
ProviderType="Int" Scale="0" Size="0" SourceColumn="DisplayOrder"
SourceColumnNullMapping="False" SourceVersion="Current">

</Parameter>

<Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
DbType="Int32" Direction="Input" ParameterName="@Original_MenuId"
Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="MenuId"
SourceColumnNullMapping="False" SourceVersion="Original">

</Parameter>

</Parameters>

</DbCommand>

</UpdateCommand>

</DbSource>

</MainSource>

<Mappings>

<Mapping SourceColumn="MenuId" DataSetColumn="MenuId" />

<Mapping SourceColumn="LocationId" DataSetColumn="LocationId" />

<Mapping SourceColumn="MenuName" DataSetColumn="MenuName" />

<Mapping SourceColumn="IsAvailable" DataSetColumn="IsAvailable" />

<Mapping SourceColumn="DisplayOrder" DataSetColumn="DisplayOrder" />

</Mappings>

<Sources>

<DbSource ConnectionRef="ASPNETDBConnectionString (Web.config)"
DbObjectName="dbo.Menus" DbObjectType="Table" EnableWebMethods="False"
FillMethodModifier="Public" FillMethodName="FillMenusByLocation"
GenerateMethods="Both" GeneratePagingMethods="False"
GenerateShortCommands="True" GetMethodName="GetMenusByLocation"
QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
UseOptimisticConcurrency="True">

<SelectCommand>

<DbCommand CommandType="Text" ModifiedByUser="True">

<CommandText>SELECT MenuId, MenuName, IsAvailable, DisplayOrder

FROM Menus

WHERE (LocationId = @parameter1)</CommandText>

<Parameters>

<Parameter AllowDbNull="False" AutogeneratedName="parameter1"
ColumnName="LocationId"
DataSourceName="[C:\SHARE\xyzzy\xyzzy\APP_DATA\ASPNETDB.MDF].dbo.Menus"
DataTypeServer="int" DbType="Int32" Direction="Input"
ParameterName="@parameter1" Precision="0" ProviderType="Int" Scale="0"
Size="4" SourceColumn="LocationId" SourceColumnNullMapping="False"
SourceVersion="Current">

</Parameter>

</Parameters>

</DbCommand>

</SelectCommand>

</DbSource>

</Sources>

</TableAdapter>
 
C

Cor Ligthert [MVP]

Dotnet,

Is it really needed to send everything, we will help you however give us
than the information about the problem.

Just my thought,

Cor
 
S

Steven Cheng[MSFT]

Hi Dotnet,

From the error message you provided, it seems the ObjectDataSource didn't
find the select method you specified from the TableAdapter at runtime. Have
you checked the TableAdapter or try regenerating it to see whether the
select method is correctly populated?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



--------------------
| From: "Dotnet Gruven" <[email protected]>
| Subject: Error: ObjectDataSource 'ObjectDataSource1' could not find a
non-generic method 'FillMenusByLocation' that has parameters: @locationId
| Date: Mon, 12 Sep 2005 18:34:37 -0400
| Lines: 301
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <uaQ3$o#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.adonet
| NNTP-Posting-Host: c-24-128-25-74.hsd1.ma.comcast.net 24.128.25.74
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.adonet:35586
| X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
|
| I'm trying to use a typed dataset and ObjectDataSource binding to a SQLX
db
| using a foreign key to filter the returned result set to display in a
| GridView.
|
| The error message in the subject line is generated when I try to bind the
| following GridView to the ObjectSource that follows and the code that
| follows that which is from an ASP.NET form PageLoad:
|
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| DeleteMethod="Delete" InsertMethod="Insert"
| SelectMethod="FillMenusByLocation"
|
| TypeName="RestaurantsTableAdapters.MenusTableAdapter"
| UpdateMethod="Update">
|
| <DeleteParameters>
|
| <asp:parameter Name="Original_MenuId" Type="Int32" />
|
| </DeleteParameters>
|
| <UpdateParameters>
|
| <asp:parameter Name="LocationId" Type="Int32" />
|
| <asp:parameter Name="MenuName" Type="String" />
|
| <asp:parameter Name="IsAvailable" Type="Boolean" />
|
| <asp:parameter Name="DisplayOrder" Type="Int32" />
|
| <asp:parameter Name="Original_MenuId" Type="Int32" />
|
| </UpdateParameters>
|
| <InsertParameters>
|
| <asp:parameter Name="LocationId" Type="Int32" />
|
| <asp:parameter Name="MenuName" Type="String" />
|
| <asp:parameter Name="IsAvailable" Type="Boolean" />
|
| <asp:parameter Name="DisplayOrder" Type="Int32" />
|
| </InsertParameters>
|
| </asp:ObjectDataSource>
| ---------------------------------------------------
|
|
| <asp:GridView ID="MenusGridView" Runat="server"
| DataSourceID="ObjectDataSource1" DataKeyNames="LocationId"
ShowHeader=True
| AutoGenerateColumns="False"
| CellPadding="4" ForeColor="#333333" GridLines="Both" >
|
| <Columns>
|
| <asp:BoundField ReadOnly="True" HeaderText="MenuId"
DataField="MenuId"
| SortExpression="MenuId" Visible=True />
|
| <asp:BoundField ReadOnly="True" HeaderText="LocationId"
| DataField="LocationId" SortExpression="LocationId" Visible=True />
|
| <asp:BoundField HeaderText="Name" DataField="MenuName"
| SortExpression="MenuName" />
|
| <asp:CheckBoxField HeaderText="Available?" DataField="IsAvailable"
| SortExpression="IsAvailable" ItemStyle-HorizontalAlign="Center" />
|
| <asp:BoundField HeaderText="DisplayOrder" DataField="DisplayOrder"
| SortExpression="DisplayOrder" />
|
| </Columns>
|
|
|
|
| </asp:GridView>
|
| --------- From Page_Load !IsPostBack
|
| ObjectDataSource1.SelectParameters.Add("@parameter1", TypeCode.Int32,
| locationId.ToString());
|
| ----------
| Here is the XSD for the related TableAdapter
|
|
| <TableAdapter BaseClass="System.ComponentModel.Component"
| DataAccessorName="MenusTableAdapter" Modifier="AutoLayout, AnsiClass,
Class,
| Public" Name="Menus" WebServiceAttribute="False">
|
| <MainSource>
|
| <DbSource ConnectionRef="ASPNETDBConnectionString (Web.config)"
| DbObjectName="dbo.Menus" DbObjectType="Table" EnableWebMethods="False"
| FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both"
| GeneratePagingMethods="False" GenerateShortCommands="True"
| GetMethodName="GetData" QueryType="Rowset"
ScalarCallRetval="System.Object,
| mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
| UseOptimisticConcurrency="False">
|
| <DeleteCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="False">
|
| <CommandText>DELETE FROM [dbo].[Menus] WHERE (([MenuId] =
| @Original_MenuId))</CommandText>
|
| <Parameters>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@Original_MenuId"
| Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="MenuId"
| SourceColumnNullMapping="False" SourceVersion="Original">
|
| </Parameter>
|
| </Parameters>
|
| </DbCommand>
|
| </DeleteCommand>
|
| <InsertCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="False">
|
| <CommandText>INSERT INTO [dbo].[Menus] ([LocationId], [MenuName],
| [IsAvailable], [DisplayOrder]) VALUES (@LocationId, @MenuName,
@IsAvailable,
| @DisplayOrder)</CommandText>
|
| <Parameters>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@LocationId"
Precision="0"
| ProviderType="Int" Scale="0" Size="0" SourceColumn="LocationId"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="String" Direction="Input" ParameterName="@MenuName" Precision="0"
| ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MenuName"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Boolean" Direction="Input" ParameterName="@IsAvailable"
| Precision="0" ProviderType="Bit" Scale="0" Size="0"
| SourceColumn="IsAvailable" SourceColumnNullMapping="False"
| SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@DisplayOrder"
Precision="0"
| ProviderType="Int" Scale="0" Size="0" SourceColumn="DisplayOrder"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| </Parameters>
|
| </DbCommand>
|
| </InsertCommand>
|
| <SelectCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="True">
|
| <CommandText>SELECT MenuId, LocationId, MenuName, IsAvailable,
DisplayOrder
| FROM Menus</CommandText>
|
| <Parameters>
|
| </Parameters>
|
| </DbCommand>
|
| </SelectCommand>
|
| <UpdateCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="False">
|
| <CommandText>UPDATE [dbo].[Menus] SET [LocationId] = @LocationId,
[MenuName]
| = @MenuName, [IsAvailable] = @IsAvailable, [DisplayOrder] = @DisplayOrder
| WHERE (([MenuId] = @Original_MenuId))</CommandText>
|
| <Parameters>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@LocationId"
Precision="0"
| ProviderType="Int" Scale="0" Size="0" SourceColumn="LocationId"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="String" Direction="Input" ParameterName="@MenuName" Precision="0"
| ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MenuName"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Boolean" Direction="Input" ParameterName="@IsAvailable"
| Precision="0" ProviderType="Bit" Scale="0" Size="0"
| SourceColumn="IsAvailable" SourceColumnNullMapping="False"
| SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@DisplayOrder"
Precision="0"
| ProviderType="Int" Scale="0" Size="0" SourceColumn="DisplayOrder"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@Original_MenuId"
| Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="MenuId"
| SourceColumnNullMapping="False" SourceVersion="Original">
|
| </Parameter>
|
| </Parameters>
|
| </DbCommand>
|
| </UpdateCommand>
|
| </DbSource>
|
| </MainSource>
|
| <Mappings>
|
| <Mapping SourceColumn="MenuId" DataSetColumn="MenuId" />
|
| <Mapping SourceColumn="LocationId" DataSetColumn="LocationId" />
|
| <Mapping SourceColumn="MenuName" DataSetColumn="MenuName" />
|
| <Mapping SourceColumn="IsAvailable" DataSetColumn="IsAvailable" />
|
| <Mapping SourceColumn="DisplayOrder" DataSetColumn="DisplayOrder" />
|
| </Mappings>
|
| <Sources>
|
| <DbSource ConnectionRef="ASPNETDBConnectionString (Web.config)"
| DbObjectName="dbo.Menus" DbObjectType="Table" EnableWebMethods="False"
| FillMethodModifier="Public" FillMethodName="FillMenusByLocation"
| GenerateMethods="Both" GeneratePagingMethods="False"
| GenerateShortCommands="True" GetMethodName="GetMenusByLocation"
| QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib,
| Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
| UseOptimisticConcurrency="True">
|
| <SelectCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="True">
|
| <CommandText>SELECT MenuId, MenuName, IsAvailable, DisplayOrder
|
| FROM Menus
|
| WHERE (LocationId = @parameter1)</CommandText>
|
| <Parameters>
|
| <Parameter AllowDbNull="False" AutogeneratedName="parameter1"
| ColumnName="LocationId"
| DataSourceName="[C:\SHARE\xyzzy\xyzzy\APP_DATA\ASPNETDB.MDF].dbo.Menus"
| DataTypeServer="int" DbType="Int32" Direction="Input"
| ParameterName="@parameter1" Precision="0" ProviderType="Int" Scale="0"
| Size="4" SourceColumn="LocationId" SourceColumnNullMapping="False"
| SourceVersion="Current">
|
| </Parameter>
|
| </Parameters>
|
| </DbCommand>
|
| </SelectCommand>
|
| </DbSource>
|
| </Sources>
|
| </TableAdapter>
|
|
|
 
D

Dotnet Gruven

Hi Cor,

I've included:
- the error message text
- the ObjectDataSource declaration from ASCX
- the GridView declaration from same ASCX
- the code behind from Page_load which adds the select parameter
- the xsd for the related type

What else might I provide that would help?

TIA,
DotNet Gruven
 
D

Dotnet Gruven

Thanks Steven,

Yes, the ObjectDataSource isn't finding the Select method in the
TableAdapter.

How would I go about checking the TableAdapter to see if the select method
is correctly populated? Interesting.... Here is what I have found using VS
2005 Beta 2, XSD designer:

1) Right click on SQL Query in TableAdapter on the DataTable and
Select Configure/Query Build/Execute Query. Plug in parameter. It works
fine returning the data expected.

2) Right click on SQL Query in TableAdapter on the DataTable and
Select Preview Data, plug the parameter in and I get the following error:

"GetMenusByLocation(@parameter1) could not be previewed. Value cannot
be null. Parameter name: objectType

Does that help?

TIA,
DotNet Gruven


Steven Cheng said:
Hi Dotnet,

From the error message you provided, it seems the ObjectDataSource didn't
find the select method you specified from the TableAdapter at runtime.
Have
you checked the TableAdapter or try regenerating it to see whether the
select method is correctly populated?

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



--------------------
| From: "Dotnet Gruven" <[email protected]>
| Subject: Error: ObjectDataSource 'ObjectDataSource1' could not find a
non-generic method 'FillMenusByLocation' that has parameters: @locationId
| Date: Mon, 12 Sep 2005 18:34:37 -0400
| Lines: 301
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <uaQ3$o#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.adonet
| NNTP-Posting-Host: c-24-128-25-74.hsd1.ma.comcast.net 24.128.25.74
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.adonet:35586
| X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
|
| I'm trying to use a typed dataset and ObjectDataSource binding to a SQLX
db
| using a foreign key to filter the returned result set to display in a
| GridView.
|
| The error message in the subject line is generated when I try to bind
the
| following GridView to the ObjectSource that follows and the code that
| follows that which is from an ASP.NET form PageLoad:
|
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| DeleteMethod="Delete" InsertMethod="Insert"
| SelectMethod="FillMenusByLocation"
|
| TypeName="RestaurantsTableAdapters.MenusTableAdapter"
| UpdateMethod="Update">
|
| <DeleteParameters>
|
| <asp:parameter Name="Original_MenuId" Type="Int32" />
|
| </DeleteParameters>
|
| <UpdateParameters>
|
| <asp:parameter Name="LocationId" Type="Int32" />
|
| <asp:parameter Name="MenuName" Type="String" />
|
| <asp:parameter Name="IsAvailable" Type="Boolean" />
|
| <asp:parameter Name="DisplayOrder" Type="Int32" />
|
| <asp:parameter Name="Original_MenuId" Type="Int32" />
|
| </UpdateParameters>
|
| <InsertParameters>
|
| <asp:parameter Name="LocationId" Type="Int32" />
|
| <asp:parameter Name="MenuName" Type="String" />
|
| <asp:parameter Name="IsAvailable" Type="Boolean" />
|
| <asp:parameter Name="DisplayOrder" Type="Int32" />
|
| </InsertParameters>
|
| </asp:ObjectDataSource>
| ---------------------------------------------------
|
|
| <asp:GridView ID="MenusGridView" Runat="server"
| DataSourceID="ObjectDataSource1" DataKeyNames="LocationId"
ShowHeader=True
| AutoGenerateColumns="False"
| CellPadding="4" ForeColor="#333333" GridLines="Both" >
|
| <Columns>
|
| <asp:BoundField ReadOnly="True" HeaderText="MenuId"
DataField="MenuId"
| SortExpression="MenuId" Visible=True />
|
| <asp:BoundField ReadOnly="True" HeaderText="LocationId"
| DataField="LocationId" SortExpression="LocationId" Visible=True />
|
| <asp:BoundField HeaderText="Name" DataField="MenuName"
| SortExpression="MenuName" />
|
| <asp:CheckBoxField HeaderText="Available?" DataField="IsAvailable"
| SortExpression="IsAvailable" ItemStyle-HorizontalAlign="Center" />
|
| <asp:BoundField HeaderText="DisplayOrder" DataField="DisplayOrder"
| SortExpression="DisplayOrder" />
|
| </Columns>
|
|
|
|
| </asp:GridView>
|
| --------- From Page_Load !IsPostBack
|
| ObjectDataSource1.SelectParameters.Add("@parameter1", TypeCode.Int32,
| locationId.ToString());
|
| ----------
| Here is the XSD for the related TableAdapter
|
|
| <TableAdapter BaseClass="System.ComponentModel.Component"
| DataAccessorName="MenusTableAdapter" Modifier="AutoLayout, AnsiClass,
Class,
| Public" Name="Menus" WebServiceAttribute="False">
|
| <MainSource>
|
| <DbSource ConnectionRef="ASPNETDBConnectionString (Web.config)"
| DbObjectName="dbo.Menus" DbObjectType="Table" EnableWebMethods="False"
| FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both"
| GeneratePagingMethods="False" GenerateShortCommands="True"
| GetMethodName="GetData" QueryType="Rowset"
ScalarCallRetval="System.Object,
| mscorlib, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
| UseOptimisticConcurrency="False">
|
| <DeleteCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="False">
|
| <CommandText>DELETE FROM [dbo].[Menus] WHERE (([MenuId] =
| @Original_MenuId))</CommandText>
|
| <Parameters>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@Original_MenuId"
| Precision="0" ProviderType="Int" Scale="0" Size="0"
SourceColumn="MenuId"
| SourceColumnNullMapping="False" SourceVersion="Original">
|
| </Parameter>
|
| </Parameters>
|
| </DbCommand>
|
| </DeleteCommand>
|
| <InsertCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="False">
|
| <CommandText>INSERT INTO [dbo].[Menus] ([LocationId], [MenuName],
| [IsAvailable], [DisplayOrder]) VALUES (@LocationId, @MenuName,
@IsAvailable,
| @DisplayOrder)</CommandText>
|
| <Parameters>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@LocationId"
Precision="0"
| ProviderType="Int" Scale="0" Size="0" SourceColumn="LocationId"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="String" Direction="Input" ParameterName="@MenuName"
Precision="0"
| ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MenuName"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Boolean" Direction="Input" ParameterName="@IsAvailable"
| Precision="0" ProviderType="Bit" Scale="0" Size="0"
| SourceColumn="IsAvailable" SourceColumnNullMapping="False"
| SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@DisplayOrder"
Precision="0"
| ProviderType="Int" Scale="0" Size="0" SourceColumn="DisplayOrder"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| </Parameters>
|
| </DbCommand>
|
| </InsertCommand>
|
| <SelectCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="True">
|
| <CommandText>SELECT MenuId, LocationId, MenuName, IsAvailable,
DisplayOrder
| FROM Menus</CommandText>
|
| <Parameters>
|
| </Parameters>
|
| </DbCommand>
|
| </SelectCommand>
|
| <UpdateCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="False">
|
| <CommandText>UPDATE [dbo].[Menus] SET [LocationId] = @LocationId,
[MenuName]
| = @MenuName, [IsAvailable] = @IsAvailable, [DisplayOrder] =
@DisplayOrder
| WHERE (([MenuId] = @Original_MenuId))</CommandText>
|
| <Parameters>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@LocationId"
Precision="0"
| ProviderType="Int" Scale="0" Size="0" SourceColumn="LocationId"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="String" Direction="Input" ParameterName="@MenuName"
Precision="0"
| ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MenuName"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Boolean" Direction="Input" ParameterName="@IsAvailable"
| Precision="0" ProviderType="Bit" Scale="0" Size="0"
| SourceColumn="IsAvailable" SourceColumnNullMapping="False"
| SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@DisplayOrder"
Precision="0"
| ProviderType="Int" Scale="0" Size="0" SourceColumn="DisplayOrder"
| SourceColumnNullMapping="False" SourceVersion="Current">
|
| </Parameter>
|
| <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| DbType="Int32" Direction="Input" ParameterName="@Original_MenuId"
| Precision="0" ProviderType="Int" Scale="0" Size="0"
SourceColumn="MenuId"
| SourceColumnNullMapping="False" SourceVersion="Original">
|
| </Parameter>
|
| </Parameters>
|
| </DbCommand>
|
| </UpdateCommand>
|
| </DbSource>
|
| </MainSource>
|
| <Mappings>
|
| <Mapping SourceColumn="MenuId" DataSetColumn="MenuId" />
|
| <Mapping SourceColumn="LocationId" DataSetColumn="LocationId" />
|
| <Mapping SourceColumn="MenuName" DataSetColumn="MenuName" />
|
| <Mapping SourceColumn="IsAvailable" DataSetColumn="IsAvailable" />
|
| <Mapping SourceColumn="DisplayOrder" DataSetColumn="DisplayOrder" />
|
| </Mappings>
|
| <Sources>
|
| <DbSource ConnectionRef="ASPNETDBConnectionString (Web.config)"
| DbObjectName="dbo.Menus" DbObjectType="Table" EnableWebMethods="False"
| FillMethodModifier="Public" FillMethodName="FillMenusByLocation"
| GenerateMethods="Both" GeneratePagingMethods="False"
| GenerateShortCommands="True" GetMethodName="GetMenusByLocation"
| QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib,
| Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
| UseOptimisticConcurrency="True">
|
| <SelectCommand>
|
| <DbCommand CommandType="Text" ModifiedByUser="True">
|
| <CommandText>SELECT MenuId, MenuName, IsAvailable, DisplayOrder
|
| FROM Menus
|
| WHERE (LocationId = @parameter1)</CommandText>
|
| <Parameters>
|
| <Parameter AllowDbNull="False" AutogeneratedName="parameter1"
| ColumnName="LocationId"
| DataSourceName="[C:\SHARE\xyzzy\xyzzy\APP_DATA\ASPNETDB.MDF].dbo.Menus"
| DataTypeServer="int" DbType="Int32" Direction="Input"
| ParameterName="@parameter1" Precision="0" ProviderType="Int" Scale="0"
| Size="4" SourceColumn="LocationId" SourceColumnNullMapping="False"
| SourceVersion="Current">
|
| </Parameter>
|
| </Parameters>
|
| </DbCommand>
|
| </SelectCommand>
|
| </DbSource>
|
| </Sources>
|
| </TableAdapter>
|
|
|
 
C

Cor Ligthert [MVP]

Dotnet,
I've included:
- the error message text
- the ObjectDataSource declaration from ASCX
- the GridView declaration from same ASCX
- the code behind from Page_load which adds the select parameter
- the xsd for the related type

It is to much, to get help in a newsgroup you have to start with a simple
explanation. The errormessage and the code that is about the error.

Otherwise nobody is able to help you. These newsgroups are mainly done by
individuals.

In addition (If I see it right is it 2005 aspnet) do I think that you have
more change in the newsgroup 'microsoft.public.dotnet.framework.aspnet'

Not that you are not welcome here, however the way you use it is mostly done
in that newsgroup and I see it seldom here.

Cor
 
S

Steven Cheng[MSFT]

Hi DotNet,

From your further description, there seems have something incorrect in the
generated TableAdapter. I'm thinking whether you can build a simple table
and generate a tableadapter to repro the problem. If convenient, you can
provide me the table structure or attach mdf file to me and the detaield
repro steps so that I can do some further tests on my side.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Dotnet Gruven" <[email protected]>
| References: <uaQ3$o#[email protected]>
<[email protected]>
| Subject: Re: Error: ObjectDataSource 'ObjectDataSource1' could not find a
non-generic method 'FillMenusByLocation' that has parameters: @locationId
| Date: Tue, 13 Sep 2005 06:08:41 -0400
| Lines: 389
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <e8y#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.adonet
| NNTP-Posting-Host: c-24-128-25-74.hsd1.ma.comcast.net 24.128.25.74
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.dotnet.framework.adonet:35630
| X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
|
| Thanks Steven,
|
| Yes, the ObjectDataSource isn't finding the Select method in the
| TableAdapter.
|
| How would I go about checking the TableAdapter to see if the select
method
| is correctly populated? Interesting.... Here is what I have found using
VS
| 2005 Beta 2, XSD designer:
|
| 1) Right click on SQL Query in TableAdapter on the DataTable and
| Select Configure/Query Build/Execute Query. Plug in parameter. It works
| fine returning the data expected.
|
| 2) Right click on SQL Query in TableAdapter on the DataTable and
| Select Preview Data, plug the parameter in and I get the following error:
|
| "GetMenusByLocation(@parameter1) could not be previewed. Value
cannot
| be null. Parameter name: objectType
|
| Does that help?
|
| TIA,
| DotNet Gruven
|
|
| | > Hi Dotnet,
| >
| > From the error message you provided, it seems the ObjectDataSource
didn't
| > find the select method you specified from the TableAdapter at runtime.
| > Have
| > you checked the TableAdapter or try regenerating it to see whether the
| > select method is correctly populated?
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| > --------------------
| > | From: "Dotnet Gruven" <[email protected]>
| > | Subject: Error: ObjectDataSource 'ObjectDataSource1' could not find a
| > non-generic method 'FillMenusByLocation' that has parameters:
@locationId
| > | Date: Mon, 12 Sep 2005 18:34:37 -0400
| > | Lines: 301
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| > | X-RFC2646: Format=Flowed; Original
| > | Message-ID: <uaQ3$o#[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.adonet
| > | NNTP-Posting-Host: c-24-128-25-74.hsd1.ma.comcast.net 24.128.25.74
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.adonet:35586
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.adonet
| > |
| > | I'm trying to use a typed dataset and ObjectDataSource binding to a
SQLX
| > db
| > | using a foreign key to filter the returned result set to display in a
| > | GridView.
| > |
| > | The error message in the subject line is generated when I try to bind
| > the
| > | following GridView to the ObjectSource that follows and the code that
| > | follows that which is from an ASP.NET form PageLoad:
| > |
| > | <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| > | DeleteMethod="Delete" InsertMethod="Insert"
| > | SelectMethod="FillMenusByLocation"
| > |
| > | TypeName="RestaurantsTableAdapters.MenusTableAdapter"
| > | UpdateMethod="Update">
| > |
| > | <DeleteParameters>
| > |
| > | <asp:parameter Name="Original_MenuId" Type="Int32" />
| > |
| > | </DeleteParameters>
| > |
| > | <UpdateParameters>
| > |
| > | <asp:parameter Name="LocationId" Type="Int32" />
| > |
| > | <asp:parameter Name="MenuName" Type="String" />
| > |
| > | <asp:parameter Name="IsAvailable" Type="Boolean" />
| > |
| > | <asp:parameter Name="DisplayOrder" Type="Int32" />
| > |
| > | <asp:parameter Name="Original_MenuId" Type="Int32" />
| > |
| > | </UpdateParameters>
| > |
| > | <InsertParameters>
| > |
| > | <asp:parameter Name="LocationId" Type="Int32" />
| > |
| > | <asp:parameter Name="MenuName" Type="String" />
| > |
| > | <asp:parameter Name="IsAvailable" Type="Boolean" />
| > |
| > | <asp:parameter Name="DisplayOrder" Type="Int32" />
| > |
| > | </InsertParameters>
| > |
| > | </asp:ObjectDataSource>
| > | ---------------------------------------------------
| > |
| > |
| > | <asp:GridView ID="MenusGridView" Runat="server"
| > | DataSourceID="ObjectDataSource1" DataKeyNames="LocationId"
| > ShowHeader=True
| > | AutoGenerateColumns="False"
| > | CellPadding="4" ForeColor="#333333" GridLines="Both" >
| > |
| > | <Columns>
| > |
| > | <asp:BoundField ReadOnly="True" HeaderText="MenuId"
| > DataField="MenuId"
| > | SortExpression="MenuId" Visible=True />
| > |
| > | <asp:BoundField ReadOnly="True" HeaderText="LocationId"
| > | DataField="LocationId" SortExpression="LocationId" Visible=True />
| > |
| > | <asp:BoundField HeaderText="Name" DataField="MenuName"
| > | SortExpression="MenuName" />
| > |
| > | <asp:CheckBoxField HeaderText="Available?"
DataField="IsAvailable"
| > | SortExpression="IsAvailable" ItemStyle-HorizontalAlign="Center" />
| > |
| > | <asp:BoundField HeaderText="DisplayOrder"
DataField="DisplayOrder"
| > | SortExpression="DisplayOrder" />
| > |
| > | </Columns>
| > |
| > |
| > |
| > |
| > | </asp:GridView>
| > |
| > | --------- From Page_Load !IsPostBack
| > |
| > | ObjectDataSource1.SelectParameters.Add("@parameter1", TypeCode.Int32,
| > | locationId.ToString());
| > |
| > | ----------
| > | Here is the XSD for the related TableAdapter
| > |
| > |
| > | <TableAdapter BaseClass="System.ComponentModel.Component"
| > | DataAccessorName="MenusTableAdapter" Modifier="AutoLayout, AnsiClass,
| > Class,
| > | Public" Name="Menus" WebServiceAttribute="False">
| > |
| > | <MainSource>
| > |
| > | <DbSource ConnectionRef="ASPNETDBConnectionString (Web.config)"
| > | DbObjectName="dbo.Menus" DbObjectType="Table" EnableWebMethods="False"
| > | FillMethodModifier="Public" FillMethodName="Fill"
GenerateMethods="Both"
| > | GeneratePagingMethods="False" GenerateShortCommands="True"
| > | GetMethodName="GetData" QueryType="Rowset"
| > ScalarCallRetval="System.Object,
| > | mscorlib, Version=2.0.0.0, Culture=neutral,
| > PublicKeyToken=b77a5c561934e089"
| > | UseOptimisticConcurrency="False">
| > |
| > | <DeleteCommand>
| > |
| > | <DbCommand CommandType="Text" ModifiedByUser="False">
| > |
| > | <CommandText>DELETE FROM [dbo].[Menus] WHERE (([MenuId] =
| > | @Original_MenuId))</CommandText>
| > |
| > | <Parameters>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="Int32" Direction="Input" ParameterName="@Original_MenuId"
| > | Precision="0" ProviderType="Int" Scale="0" Size="0"
| > SourceColumn="MenuId"
| > | SourceColumnNullMapping="False" SourceVersion="Original">
| > |
| > | </Parameter>
| > |
| > | </Parameters>
| > |
| > | </DbCommand>
| > |
| > | </DeleteCommand>
| > |
| > | <InsertCommand>
| > |
| > | <DbCommand CommandType="Text" ModifiedByUser="False">
| > |
| > | <CommandText>INSERT INTO [dbo].[Menus] ([LocationId], [MenuName],
| > | [IsAvailable], [DisplayOrder]) VALUES (@LocationId, @MenuName,
| > @IsAvailable,
| > | @DisplayOrder)</CommandText>
| > |
| > | <Parameters>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="Int32" Direction="Input" ParameterName="@LocationId"
| > Precision="0"
| > | ProviderType="Int" Scale="0" Size="0" SourceColumn="LocationId"
| > | SourceColumnNullMapping="False" SourceVersion="Current">
| > |
| > | </Parameter>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="String" Direction="Input" ParameterName="@MenuName"
| > Precision="0"
| > | ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MenuName"
| > | SourceColumnNullMapping="False" SourceVersion="Current">
| > |
| > | </Parameter>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="Boolean" Direction="Input" ParameterName="@IsAvailable"
| > | Precision="0" ProviderType="Bit" Scale="0" Size="0"
| > | SourceColumn="IsAvailable" SourceColumnNullMapping="False"
| > | SourceVersion="Current">
| > |
| > | </Parameter>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="Int32" Direction="Input" ParameterName="@DisplayOrder"
| > Precision="0"
| > | ProviderType="Int" Scale="0" Size="0" SourceColumn="DisplayOrder"
| > | SourceColumnNullMapping="False" SourceVersion="Current">
| > |
| > | </Parameter>
| > |
| > | </Parameters>
| > |
| > | </DbCommand>
| > |
| > | </InsertCommand>
| > |
| > | <SelectCommand>
| > |
| > | <DbCommand CommandType="Text" ModifiedByUser="True">
| > |
| > | <CommandText>SELECT MenuId, LocationId, MenuName, IsAvailable,
| > DisplayOrder
| > | FROM Menus</CommandText>
| > |
| > | <Parameters>
| > |
| > | </Parameters>
| > |
| > | </DbCommand>
| > |
| > | </SelectCommand>
| > |
| > | <UpdateCommand>
| > |
| > | <DbCommand CommandType="Text" ModifiedByUser="False">
| > |
| > | <CommandText>UPDATE [dbo].[Menus] SET [LocationId] = @LocationId,
| > [MenuName]
| > | = @MenuName, [IsAvailable] = @IsAvailable, [DisplayOrder] =
| > @DisplayOrder
| > | WHERE (([MenuId] = @Original_MenuId))</CommandText>
| > |
| > | <Parameters>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="Int32" Direction="Input" ParameterName="@LocationId"
| > Precision="0"
| > | ProviderType="Int" Scale="0" Size="0" SourceColumn="LocationId"
| > | SourceColumnNullMapping="False" SourceVersion="Current">
| > |
| > | </Parameter>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="String" Direction="Input" ParameterName="@MenuName"
| > Precision="0"
| > | ProviderType="NVarChar" Scale="0" Size="0" SourceColumn="MenuName"
| > | SourceColumnNullMapping="False" SourceVersion="Current">
| > |
| > | </Parameter>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="Boolean" Direction="Input" ParameterName="@IsAvailable"
| > | Precision="0" ProviderType="Bit" Scale="0" Size="0"
| > | SourceColumn="IsAvailable" SourceColumnNullMapping="False"
| > | SourceVersion="Current">
| > |
| > | </Parameter>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="Int32" Direction="Input" ParameterName="@DisplayOrder"
| > Precision="0"
| > | ProviderType="Int" Scale="0" Size="0" SourceColumn="DisplayOrder"
| > | SourceColumnNullMapping="False" SourceVersion="Current">
| > |
| > | </Parameter>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName=""
| > | DbType="Int32" Direction="Input" ParameterName="@Original_MenuId"
| > | Precision="0" ProviderType="Int" Scale="0" Size="0"
| > SourceColumn="MenuId"
| > | SourceColumnNullMapping="False" SourceVersion="Original">
| > |
| > | </Parameter>
| > |
| > | </Parameters>
| > |
| > | </DbCommand>
| > |
| > | </UpdateCommand>
| > |
| > | </DbSource>
| > |
| > | </MainSource>
| > |
| > | <Mappings>
| > |
| > | <Mapping SourceColumn="MenuId" DataSetColumn="MenuId" />
| > |
| > | <Mapping SourceColumn="LocationId" DataSetColumn="LocationId" />
| > |
| > | <Mapping SourceColumn="MenuName" DataSetColumn="MenuName" />
| > |
| > | <Mapping SourceColumn="IsAvailable" DataSetColumn="IsAvailable" />
| > |
| > | <Mapping SourceColumn="DisplayOrder" DataSetColumn="DisplayOrder" />
| > |
| > | </Mappings>
| > |
| > | <Sources>
| > |
| > | <DbSource ConnectionRef="ASPNETDBConnectionString (Web.config)"
| > | DbObjectName="dbo.Menus" DbObjectType="Table" EnableWebMethods="False"
| > | FillMethodModifier="Public" FillMethodName="FillMenusByLocation"
| > | GenerateMethods="Both" GeneratePagingMethods="False"
| > | GenerateShortCommands="True" GetMethodName="GetMenusByLocation"
| > | QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib,
| > | Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
| > | UseOptimisticConcurrency="True">
| > |
| > | <SelectCommand>
| > |
| > | <DbCommand CommandType="Text" ModifiedByUser="True">
| > |
| > | <CommandText>SELECT MenuId, MenuName, IsAvailable, DisplayOrder
| > |
| > | FROM Menus
| > |
| > | WHERE (LocationId = @parameter1)</CommandText>
| > |
| > | <Parameters>
| > |
| > | <Parameter AllowDbNull="False" AutogeneratedName="parameter1"
| > | ColumnName="LocationId"
| > |
DataSourceName="[C:\SHARE\xyzzy\xyzzy\APP_DATA\ASPNETDB.MDF].dbo.Menus"
| > | DataTypeServer="int" DbType="Int32" Direction="Input"
| > | ParameterName="@parameter1" Precision="0" ProviderType="Int" Scale="0"
| > | Size="4" SourceColumn="LocationId" SourceColumnNullMapping="False"
| > | SourceVersion="Current">
| > |
| > | </Parameter>
| > |
| > | </Parameters>
| > |
| > | </DbCommand>
| > |
| > | </SelectCommand>
| > |
| > | </DbSource>
| > |
| > | </Sources>
| > |
| > | </TableAdapter>
| > |
| > |
| > |
| >
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top