Question

I am using a FormView control on an ASP.Net page with an ObjectDataSource that is linked to a Business Tier component connected to stored procedures in the SQL Server. I am getting the ObjectDataSource could not be found error and I have made sure that all my components contain the parameters (and that they exist).

enter image description here

I can't figure out why it can't find the parameters even though they are there?

Stored Procedure:

UPDATE [Anime_List] SET [Name] = @name, [AnimeImage] = @anime_image, [Synopsis] = @synopsis, [Type] = @type, [Episodes] = @episodes, [Genres] = @genres, [Rating] = @rating WHERE (([AnimeID] = @original_animeID));

Business Component:

[DataObjectMethod(DataObjectMethodType.Update)]
public static void UpdateAnimeList(string name, string anime_image, string synopsis, 
    string type, short episodes, string genres, decimal rating, int original_animeID,
    int animeID)
{
    animeList.AnimeListUpdateCommand(name, anime_image, synopsis, type, episodes,
        genres, rating, original_animeID, animeID);
}

Database Design:

enter image description here

Table Adapter Configuration:

enter image description here

ASP.Net:

<asp:ObjectDataSource ID="AnimeDataSource" runat="server" DeleteMethod="DeleteAnimeTitle" InsertMethod="InsertAnimeList" OldValuesParameterFormatString="original_{0}" SelectMethod="GetAllTitles" TypeName="Business.BAnimeList" UpdateMethod="UpdateAnimeList">
            <DeleteParameters>
                <asp:Parameter Name="original_animeID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="name" Type="String" />
                <asp:Parameter Name="anime_image" Type="String" />
                <asp:Parameter Name="synopsis" Type="String" />
                <asp:Parameter Name="type" Type="String" />
                <asp:Parameter Name="episodes" Type="Int16" />
                <asp:Parameter Name="genres" Type="String" />
                <asp:Parameter Name="rating" Type="Decimal" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="name" Type="String" />
                <asp:Parameter Name="anime_image" Type="String" />
                <asp:Parameter Name="synopsis" Type="String" />
                <asp:Parameter Name="type" Type="String" />
                <asp:Parameter Name="episodes" Type="Int16" />
                <asp:Parameter Name="genres" Type="String" />
                <asp:Parameter Name="rating" Type="Decimal" />
                <asp:Parameter Name="original_animeID" Type="Int32" />
                <asp:Parameter Name="animeID" Type="Int32" />
            </UpdateParameters>
        </asp:ObjectDataSource>

Thanks for your help!

Was it helpful?

Solution

It seems to be failing looking for another AnimeImage.

I'd suggest matching the casing (capitalization, don't use under_case) and order of the arguments the error page is asking for.

Something like

[DataObjectMethod(DataObjectMethodType.Update)]
public static void UpdateAnimeList(string name, string **animeImage**, string synopsis, 
    string type, short episodes, string genres, decimal rating, int original_animeID,
int animeID) {
    ...
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top