views:

17

answers:

0

Hi,

In my case I have to fetch data from two table so, inspite of using a select property.. I am using command Text..but on running it throws error:

'dbo.InvestorSectors' could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly. Near member access expression, line 10, column 91.

and here is my entity data source control:

<asp:EntityDataSource ID="investmentSectormentDataSource" runat="server" ConnectionString="name=entities"
            DefaultContainerName="entities">
        </asp:EntityDataSource>

and here is a command text:

SELECT [InvestorSectors].[InvestorSectorId]
  ,[InvestorSectors].[SubSector]
  ,[InvestorSectors].[Stages]
  ,[InvestorSectors].[Territory]
  ,[InvestorSectors].[InvestmentAmount]
  ,[InvestorSectors].[Comments]
  ,[InvestorSectors].[SectorId]
  ,[InvestorSectors].[InvestorId]
  ,[Sectors].[SectorName]
  FROM [dbo].[InvestorSectors] INNER JOIN [Sectors] ON [InvestorSectors].[SectorId] =  [Sectors].[SectorId] WHERE [InvestorId] = '0E28F465-8F9C-4503-8FD7-F034AA2C7435'

Any help will be really apprectiated.

Thanks

related questions