I have a problem with Retrieve Database Tables in the DatabaseFirst Mode In SqlServer
I Get an Error :
this method or property cannot be called on Null values
I Discovered that when a table have a Constraint(relation or index or Constraint) with other table on different Schema than first table this error Raised.
It Seems be a bug in EntityDeveloper
Please Help me.
Problem With Retrive Database Object in SqlServer
-
- Posts: 5
- Joined: Mon 14 May 2012 05:04
Re: Problem With Retrive Database Object in SqlServer
Unfortunately, we cannot reproduce the issue in our environment at the moment.
Please specify the following:
1) the exact model (NHibernate, Entity Framework or LINQ to SQL) you are using during development;
2) the exact version (x.x.xxx) of Entity Developer;
3) When does the error occur exactly? When you are trying to expand the Tables node in the Create Wizard or the Database Explorer?
4) Please also send us your database creation script so that we could reproduce the issue.
Please specify the following:
1) the exact model (NHibernate, Entity Framework or LINQ to SQL) you are using during development;
2) the exact version (x.x.xxx) of Entity Developer;
3) When does the error occur exactly? When you are trying to expand the Tables node in the Create Wizard or the Database Explorer?
4) Please also send us your database creation script so that we could reproduce the issue.
-
- Posts: 5
- Joined: Mon 14 May 2012 05:04
Re: Problem With Retrive Database Object in SqlServer
Thanks for your reply
1)Nhibernate
2) Entity Developer 4.3.178 Free And Test Older Versions
3)When Expand Tables Node Both Wizard And Database Explorer(Both Group By Schema and Normal)
4)Script:
CREATE TABLE [PRD].[tbProduct](
[productID] [int] NOT NULL,
[productCode] [varchar](10) NOT NULL,
[productName] [nvarchar](100) NOT NULL,
[productModelNo] [nvarchar](50) NULL,
CONSTRAINT [PK_tbProduct] PRIMARY KEY CLUSTERED
(
[productID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [PRD].[tbProduct] WITH CHECK ADD CONSTRAINT [FK_tbProduct_tbItem] FOREIGN KEY([productID])
REFERENCES [ITM].[tbItem] ([itemID])
GO
CREATE TABLE [ITM].[tbItem](
[itemID] [int] IDENTITY(1,1) NOT NULL,
[itemBaseNameID] [int] NOT NULL,
[itemCode] [varchar](100) NOT NULL,
CONSTRAINT [PK_tbItem_1] PRIMARY KEY CLUSTERED
(
[itemID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
1)Nhibernate
2) Entity Developer 4.3.178 Free And Test Older Versions
3)When Expand Tables Node Both Wizard And Database Explorer(Both Group By Schema and Normal)
4)Script:
CREATE TABLE [PRD].[tbProduct](
[productID] [int] NOT NULL,
[productCode] [varchar](10) NOT NULL,
[productName] [nvarchar](100) NOT NULL,
[productModelNo] [nvarchar](50) NULL,
CONSTRAINT [PK_tbProduct] PRIMARY KEY CLUSTERED
(
[productID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [PRD].[tbProduct] WITH CHECK ADD CONSTRAINT [FK_tbProduct_tbItem] FOREIGN KEY([productID])
REFERENCES [ITM].[tbItem] ([itemID])
GO
CREATE TABLE [ITM].[tbItem](
[itemID] [int] IDENTITY(1,1) NOT NULL,
[itemBaseNameID] [int] NOT NULL,
[itemCode] [varchar](100) NOT NULL,
CONSTRAINT [PK_tbItem_1] PRIMARY KEY CLUSTERED
(
[itemID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
Re: Problem With Retrive Database Object in SqlServer
Thank you for additional information.
We executed your script on a clean database and couldn't reproduce the error. Apparently, some other database objects affect the error occurrence.
Is the described error reproduced when connecting to other databases?
Could you send us the complete script for database creation?
We executed your script on a clean database and couldn't reproduce the error. Apparently, some other database objects affect the error occurrence.
Is the described error reproduced when connecting to other databases?
Could you send us the complete script for database creation?
-
- Posts: 5
- Joined: Mon 14 May 2012 05:04
Re: Problem With Retrive Database Object in SqlServer
unfortunately for security reason of my company,I can not script database for you.
but i see that when in a relation between two table in different schema we have extra index in second table that columns in the index equal to index primary column,this error raised.
So I removed extra Index and Problem Temporarily Solved.
Thanks for your Attention
but i see that when in a relation between two table in different schema we have extra index in second table that columns in the index equal to index primary column,this error raised.
So I removed extra Index and Problem Temporarily Solved.
Thanks for your Attention