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="hidden"" 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>