Missing TableAdapter from DataSet or Business Object Empty

Last post 02-06-2008 2:00 PM by dune44. 2 replies.

Sort Posts:

  • Missing TableAdapter from DataSet or Business Object Empty

    01-31-2008, 4:38 PM
    • Loading...
    • dune44
    • Joined on 06-28-2006, 4:15 PM
    • Boise, ID
    • Posts 6

    The Scenario:
     I created a DataSet called GetHouses.xsd that gets data from a table based on which user is logged in.  I named the Return a DataTable Method name: GetDataByUser.

    I have tried Google and these forums but I haven't found anything matching what I am experiencing.  I've done similar scenarios with success.

    The Problem:
    When I go to bind the DataObjectSource to GridView there are no DataSet TableAdapter listed, the Business Object dropdown is completely empty whether I have 'Show only data components' checked or not.

    The Error:
    I get this when I try to manually type asp:ObjectDataSource:

    The type 'GetHousesTableADaters.GetHousesTableADaters' could not be loaded.  If the type is located in the App_Code folder, please check that it compiles.  If the type is located in a compiled assembly, please check that the assembly is referenced by the project.

     Could not load type 'GetHousesTableADaters.GetHousesTableADaters' from assembly 'Microsoft.Web.Design.Client, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f711d50a3a'.

    Additional information:
    I am connecting to the database on a hosted server MS SQL 2005.  I have tried with a local sql express db as well with the same result.

    I am using VS 2008 Beta 2 but have also tried with VS 2005 in case it was a glitch with VS.

    I am using the Membership API for users to login in a seperate DB

    My web.config connection string:
    <connectionStrings>
    <
    add name="MSSqlServerConnect" connectionString="server=hidden;database=hidden;uid=hidden;pwd=hidden" />
    <
    add name="HouseDBServerConnect" connectionString="server=hidden;database=hidden;uid=hidden;pwd=hidden" />
    <
    add name="DBConnectionString" connectionString="Data Source=hidden;Initial Catalog=hidden;Persist Security Info=True;User ID=hidden;Password=&quot;hidden&quot;" providerName="System.Data.SqlClient" />
    <
    add name="DatabaseNameConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\DatabaseName.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" />
    </
    connectionStrings>

    SQL Query string:
    SELECT         HouseAds.*
    FROM            HouseAds
    WHERE        (UserName = @UserName)

    ObjectDataSource Code:
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
    InsertMethod="Insert" SelectMethod="GetDataByUser" TypeName="GetHouseTableAdapters.GetHouseTableAdapters"
    UpdateMethod="Update">
    </asp:ObjectDataSource>

  • Re: Missing TableAdapter from DataSet or Business Object Empty

    02-05-2008, 12:42 AM
    Answer

    Hi,

    From your description, it seems that you can’t choose the business object since it disappears when you configure your objectdatasource, right?

    Generally there are two potential causes. First, you’ve create a dataset, but didn’t initialized the table setup the TableAdatper; Another is you didn’t save the dataset file (.xsd) in the APP_CODE folder. In your case, please make sure if you have put the dataset file into the App_Code folder, since for a dataset to be generally consumable in your site, it should be placed inside the 'App_Code' folder.

    Thanks.

    Sincerely,
    Michael Jin.
    Microsoft Online Community Support

  • Re: Missing TableAdapter from DataSet or Business Object Empty

    02-06-2008, 2:00 PM
    • Loading...
    • dune44
    • Joined on 06-28-2006, 4:15 PM
    • Boise, ID
    • Posts 6

    Thank you for your reply, it is very appreciated.

    I did however have my dataset in the App_Code folder.  So I've been playing around with things and decided to disable Membership on a whim and low and behold my datasets could be accessed from the wizard again.  Everything seems to work fine when I re-enable memberships and upload to my server. 

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter