ObjectDataSource 'ObjectDataSource1' could not find a non-generic method

A

aitor.diazdealda

I am in a very deep hole and i can not see the light .

Here my mistake if you could help me.


store procedure.-> they work ok.

ALTER PROCEDURE dbo.UpdateEtiClientesEtidora
(
@CLI_COD_PLAZA nvarchar(3),
@CLI_COD_CLI nvarchar(9),
@ETIDORA_COD_ANT int,
@ETIDORA_COD_NEW int,
@NUMERO int)
AS
SET NOCOUNT ON;
UPDATE EtiClientes SET CLI_COD_PLAZA=@CLI_COD_PLAZA,

CLI_COD_CLI=@CLI_COD_CLI,ETIDORA_COD=@ETIDORA_COD_NEW,NUMERO=@NUMERO
WHERE ([CLI_COD_CLI] = @CLI_COD_CLI) and
([CLI_COD_PLAZA]=@CLI_COD_PLAZA) and ([ETIDORA_COD]=@ETIDORA_COD_ANT)

ALTER PROCEDURE dbo.DeleteEtiCustomerEtidora
(
@CLI_COD_CLI int,
@CLI_COD_PLAZA int,
@ETIDORA_COD int)
AS
SET NOCOUNT ON;
DELETE FROM EtiClientes WHERE ([CLI_COD_CLI] = @CLI_COD_CLI) and
([CLI_COD_PLAZA]=@CLI_COD_PLAZA) and
([ETIDORA_COD]=@ETIDORA_COD)


El siguiente codigo.

<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False"
DataSourceID="ObjectDataSource1">

<Columns>
<asp:TemplateField ShowHeader="False">
<EditItemTemplate>
<asp:ImageButton ID="ImageButton4" runat="server"
CausesValidation="True"
CommandName="Update" ImageUrl="~/img/bg.gif"
OnClientClick="Button4_Click"
/>
<asp:ImageButton ID="ImageButton5" runat="server"
CausesValidation="False"
CommandName="Cancel" ImageUrl="~/img/no.gif"
OnClientClick="Button5_Click"
/>

&nbsp;

</EditItemTemplate>
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/img/
Edit.gif"
OnClientClick="Button1_Click" commandname="Edit"/>
<asp:ImageButton ID="ImageButton2" runat="server" CommandName="select"
ImageUrl="~/img/detalle.gif" OnClientClick="button2_click" />
<asp:ImageButton ID="ImageButton3" runat="server"
ImageUrl="~/img/Delete.gif" OnClientClick="button3_click"
CommandName="delete" />
</ItemTemplate>

</asp:TemplateField>
<asp:TemplateField HeaderText="Cliente" SortExpression="CLI_COD_CLI">
<EditItemTemplate>
&nbsp;<asp:Label ID="Label4" runat="server" Text='<%#
Eval("CLI_COD_CLI")
%>' Width="48px"></asp:Label>

</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("CLI_COD_CLI")
%>'></asp:Label>

</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Numero" SortExpression="Numero">

<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" MaxLength="2" Text='<%#
Bind("Numero") %>'
Width="32px"></asp:TextBox>

</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Numero")
%>'></asp:Label>

</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Modelo"
SortExpression="ETIDORA_NOMBRE">

<EditItemTemplate>
&nbsp;<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource1"
DataTextField="ETIDORA_NOMBRE" DataValueField="ETIDORA_NOMBRE"
Width="128px"
SelectedValue='<%# Bind("ETIDORA_NOMBRE") %>'>

</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$
ConnectionStrings:ConnectionString2 %>"
SelectCommand="SELECT [ETIDORA_NOMBRE] FROM [ETIDORAS]"></
asp:SqlDataSource>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("ETIDORA_NOMBRE")
%>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>

</asp:GridView>
&nbsp;&nbsp;&nbsp; &nbsp;
</div>
&nbsp;&nbsp;&nbsp;
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
OldValuesParameterFormatString="{0}"
SelectMethod="GetEtiClientesEtidora"
TypeName="DsEtidoraTableAdapters.EtiClientesEtidoraTableAdapter"
DeleteMethod="DeleteEtiClientesEtidora"
UpdateMethod="UpdateEtiClientesEtidora"
InsertMethod="InsertEtiClientesEtidora">

<DeleteParameters>
<asp:parameter Name="CLI_COD_PLAZA" Type="String" />
<asp:parameter Name="CLI_COD_CLI" Type="String" />
<asp:parameter Name="ETIDORA_COD" Type="Int32" />
</DeleteParameters>

<UpdateParameters>
<asp:parameter Name="CLI_COD_PLAZA" Type="String" />
<asp:parameter Name="CLI_COD_CLI" Type="String" />
<asp:parameter Name="ETIDORA_COD_NEW" Type="Int32" />
<asp:parameter Name="NUMERO" Type="Int32" />
<asp:parameter Name="ETIDORA_COD_ANT" Type="Int32" />
</UpdateParameters>

<InsertParameters>
<asp:parameter Name="CLI_COD_PLAZA" Type="String" />
<asp:parameter Name="CLI_COD_CLI" Type="String" />
<asp:parameter Name="ETIDORA_COD" Type="Int32" />
<asp:parameter Name="NUMERO" Type="Int32" />
</InsertParameters>

<SelectParameters>
</SelectParameters>

</asp:ObjectDataSource>
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top