locked
Overload resolution failed because no accessible 'ToString' accepts this number of arguments. RRS feed

  • Question

  • User187447293 posted

    Please can someone help me!

    I have read just about every other post on this forum and many others, but they do not sort out the problem I have. I am building a website using asp in dreamweaver backed with an access database (this is what the company chose not me!)

    My page is a search page and is based on user input, my SQL query works as I have tested it both in access and through dreamweaver when setting up my dataset.

    Everything works, until I place a datagrid on my page to display the dataset results, then I get this error.

     

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: BC30516: Overload resolution failed because no accessible 'ToString' accepts this number of arguments.

    Source Error:

    Line 1:  <%@ Page Language="VB" Debug="true" %>
    Line 2:  <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
    Line 3:  <MM:DataSet 
    Line 4:  id="GenSearchSet"
    Line 5:  runat="Server"


    Source File: C:\inetpub\wwwroot\Provdb\Provdbgensearch.aspx    Line: 3

     

    My code is as follows, but the dataset code was generated directly by dreamweaver, I didn't write it myself.

    <%@ Page Language="VB" Debug="true" %>
    <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
    <MM:DataSet
    id="GenSearchSet"
    runat="Server"
    IsStoredProcedure="false"
    ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_GenSearch") %>'
    DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_GenSearch") %>'
    CommandText='<%# "SELECT Contacts.[CompanyName], Contacts.[Address], Contacts.[CityTown], Contacts.[County], Contacts.[PostCode], Contacts.[Telephone], Route.QualificationCourseTitle, Route.Level, Route.Location, Contacts.LoginID, Route.LoginID  FROM Contacts, Route  WHERE (((Route.QualificationCourseTitle) LIKE  "%"+ (Request.Form("txtKeywordsearch")) + "%"  AND ([Contacts].[LoginID]=[Route].[LoginID])))" %>'
    Debug="true" PageSize="10"
    ></MM:DataSet>
    <MM:PageBind runat="server" PostBackBind="true" />
    <script runat="server">

     
       
    Sub searchcall(sender As Object, e As EventArgs)

    End Sub

     

    </script>

    This is followed later on in the html code with the datagrid markup as follows


    <form runat="server">
      <asp:DataGrid id="GenSearchGrid"
      runat="server"
      AllowSorting="False"
      AutoGenerateColumns="false"
      CellPadding="3"
      CellSpacing="0"
      ShowFooter="false"
      ShowHeader="true"
      DataSource="<%# GenSearchSet.DefaultView %>"
      PagerStyle-Mode="NextPrev"
      AllowPaging="true"
      AllowCustomPaging="true"
      PageSize="<%# GenSearchSet.PageSize %>"
      VirtualItemCount="<%# GenSearchSet.RecordCount %>"
      OnPageIndexChanged="GenSearchSet.OnDataGridPageIndexChanged"
    >
        <HeaderStyle HorizontalAlign="center" BackColor="#E8EBFD" ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Bold="true" Font-Size="smaller" />
        <ItemStyle BackColor="#F2F2F2" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Size="smaller" />
        <AlternatingItemStyle BackColor="#E5E5E5" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Size="smaller" />
        <FooterStyle HorizontalAlign="center" BackColor="#E8EBFD" ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Bold="true" Font-Size="smaller" />
        <PagerStyle BackColor="white" Font-Name="Verdana, Arial, Helvetica, sans-serif" Font-Size="smaller" />
        <Columns>
          <asp:BoundColumn DataField="CompanyName"
            HeaderText="CompanyName"
            ReadOnly="true"
            Visible="True"/>     
          <asp:BoundColumn DataField="Address"
            HeaderText="Address"
            ReadOnly="true"
            Visible="True"/>     
          <asp:BoundColumn DataField="CityTown"
            HeaderText="CityTown"
            ReadOnly="true"
            Visible="True"/>     
          <asp:BoundColumn DataField="County"
            HeaderText="County"
            ReadOnly="true"
            Visible="True"/>     
          <asp:BoundColumn DataField="PostCode"
            HeaderText="PostCode"
            ReadOnly="true"
            Visible="True"/>     
          <asp:BoundColumn DataField="Telephone"
            HeaderText="Telephone"
            ReadOnly="true"
            Visible="True"/>     
          <asp:BoundColumn DataField="QualificationCourseTitle"
            HeaderText="QualificationCourseTitle"
            ReadOnly="true"
            Visible="True"/>     
          <asp:BoundColumn DataField="Level"
            HeaderText="Level"
            ReadOnly="true"
            Visible="True"/>     
          <asp:BoundColumn DataField="Location"
            HeaderText="Location"
            ReadOnly="true"
            Visible="True"/>     
    </Columns>
      </asp:DataGrid>
    </form>

    I haven't included all of the html as I don't see it being of any relevance to the error.

    But if someone could please explain where I have gone wrong on this, I would be forever greatful, as I have been stuck on this for far to long now as it is and getting nowhere.

    Thanks in advance

    Monday, February 8, 2010 8:51 AM

Answers

  • User187447293 posted

     Thanks everyone for your help, but I managed to sort it. I deleted everything dreamweaver to do with the dataset and grid and I used another program (Expression Web) to insert it. When I went back into dreamweaver, it all worked. Not the best way of doing something I know, but it works so I am not going to argue

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 10, 2010 3:02 AM

All replies

  • User1759999623 posted

    The problem is in your assembly DreamweaverCtrls where there is a class that contains a ToString method that could have a number of issues associated with it.

    If this is a third-party control, then I would go back to the manufacturer/developer on this one.  If this is your assembly, please provide your code associated with the ToString method. 

    Monday, February 8, 2010 10:35 AM
  • User187447293 posted

    This is a third party control, I didn't write the associated code, dreamweaver automatically created it.

    Is there any other way around this? I really do not want to go back to the drawing board on this one as over a months worth of work has gone into it.

    All I want to do, is search my database based on user input and display the results.

    Thanks

    Monday, February 8, 2010 10:58 AM
  • User-952121411 posted

    What is the name of the 3rd party control?  Odds are that they have their own support forum where your question could be more directly answered. 

    Monday, February 8, 2010 2:50 PM
  • User1759999623 posted

    Well, I think it's time to start over because from what I can tell, your main problem is that DreamweaverCtrls is based on ASP.NET 1.1.  Overall, you would be better off making the change before you go further into the ASP.NET world with an obsolete third-party DLL.

    As for your problem, my guess is that you do not have .NET 1.1 installed.  If you installed it, your web application should be working. 

    Tuesday, February 9, 2010 2:37 PM
  • User187447293 posted

     Thanks everyone for your help, but I managed to sort it. I deleted everything dreamweaver to do with the dataset and grid and I used another program (Expression Web) to insert it. When I went back into dreamweaver, it all worked. Not the best way of doing something I know, but it works so I am not going to argue

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 10, 2010 3:02 AM