in

CodeSmith Community

Your Code. Your Way. Faster!

already defines a member called 'GetByLinkID' with the same parameter types

Last post 11-24-2006 11:14 PM by dmoon396. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-24-2006 5:47 PM

    • dmoon396
    • Not Ranked
    • Joined on 11-24-2006
    • Posts 3
    • Points 45

    already defines a member called 'GetByLinkID' with the same parameter types

    I am getting the following error when I attempt to compile my .NET 2.0 NetTiers generated code:

    Type 'NeoRiff.Data.Bases.LinkCategoryProviderBaseCore' already defines a member called 'GetByLinkID' with the same parameter types C:\NetTiers\NeoRiff\NeoRiff.Data\Bases\LinkCategoryProviderBaseCore.generated.cs

    I have observed a few posts on this issue, but I cannot seem to get this problem fixed.

    Are there any new ideas out there on this problem? 

    Here is my SQL Server 2006 DDL script:

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Category]') AND type in (N'U'))

    BEGIN

    CREATE TABLE [dbo].[Category](

    [CategoryID] [uniqueidentifier] NOT NULL,

    [ParentID] [uniqueidentifier] NULL,

    [Name] [nvarchar](50) NOT NULL,

    [Description] [nvarchar](255) NOT NULL,

    [CreatedDate] [datetime] NOT NULL CONSTRAINT [DF_CATEGORY_INSERTED_DATE] DEFAULT (getdate()),

    [CreatedBy] [nvarchar](255) NOT NULL,

    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_CATEGORY_UPDATED_DATE] DEFAULT (getdate()),

    [ModifiedBy] [nvarchar](255) NOT NULL,

    [ExpiryDate] [datetime] NOT NULL CONSTRAINT [DF_Category_ExpiryDate] DEFAULT (CONVERT([datetime],'01/01/1900',(101))),

    CONSTRAINT [PK_Category] PRIMARY KEY CLUSTERED

    (

    [CategoryID] ASC

    )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

    ) ON [PRIMARY]

    END

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Link]') AND type in (N'U'))

    BEGIN

    CREATE TABLE [dbo].[Link](

    [LinkID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_Link_LinkID] DEFAULT (newid()),

    [Title] [nvarchar](255) NOT NULL,

    [URL] [nvarchar](255) NOT NULL,

    [Sequence] [int] NOT NULL CONSTRAINT [DF_LINK_SEQUENCE] DEFAULT ((0)),

    [Description] [nvarchar](255) NOT NULL,

    [CreatedDate] [datetime] NOT NULL CONSTRAINT [DF_LINK_INSERTED_DATE] DEFAULT (getdate()),

    [CreatedBy] [nvarchar](255) NOT NULL,

    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_LINK_UPDATED_DATE] DEFAULT (getdate()),

    [ModifiedBy] [nvarchar](255) NOT NULL,

    [ExpiryDate] [datetime] NOT NULL CONSTRAINT [DF_Link_ExpiryDate] DEFAULT (CONVERT([datetime],'01/01/1900',(101))),

    CONSTRAINT [PK_Link] PRIMARY KEY CLUSTERED

    (

    [LinkID] ASC

    )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

    ) ON [PRIMARY]

    END

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Post]') AND type in (N'U'))

    BEGIN

    CREATE TABLE [dbo].[Post](

    [PostID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_Post_PostID] DEFAULT (newid()),

    [CategoryID] [uniqueidentifier] NOT NULL,

    [Title] [nvarchar](255) NOT NULL,

    [Message] [ntext] NOT NULL,

    [CreatedDate] [datetime] NOT NULL CONSTRAINT [DF_POST_INSERTED_DATE] DEFAULT (getdate()),

    [CreatedBy] [nvarchar](255) NOT NULL,

    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_POST_UPDATED_DATE] DEFAULT (getdate()),

    [ModifiedBy] [nvarchar](255) NOT NULL,

    [ExpiryDate] [datetime] NOT NULL CONSTRAINT [DF_Post_ExpiryDate] DEFAULT (CONVERT([datetime],'01/01/1900',(101))),

    CONSTRAINT [PK_Post] PRIMARY KEY CLUSTERED

    (

    [PostID] ASC

    )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

    END

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[LinkCategory]') AND type in (N'U'))

    BEGIN

    CREATE TABLE [dbo].[LinkCategory](

    [LinkCategoryID] [uniqueidentifier] NOT NULL,

    [LinkID] [uniqueidentifier] NOT NULL,

    [CategoryID] [uniqueidentifier] NOT NULL,

    CONSTRAINT [PK_LinkCategory] PRIMARY KEY CLUSTERED

    (

    [LinkCategoryID] ASC

    )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

    ) ON [PRIMARY]

    END

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PostComment]') AND type in (N'U'))

    BEGIN

    CREATE TABLE [dbo].[PostComment](

    [CommentID] [uniqueidentifier] NOT NULL,

    [PostID] [uniqueidentifier] NOT NULL,

    [Title] [nvarchar](255) NOT NULL,

    [Message] [ntext] NOT NULL,

    [URL] [nvarchar](255) NOT NULL,

    [IsApproved] [bit] NOT NULL,

    [CreatedDate] [datetime] NOT NULL CONSTRAINT [DF_COMMENT_INSERTED_DATE] DEFAULT (getdate()),

    [CreatedBy] [nvarchar](255) NOT NULL,

    [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_Comment_ModifiedDate] DEFAULT (getdate()),

    [ModifiedBy] [nvarchar](255) NOT NULL,

    [ExpiryDate] [datetime] NOT NULL CONSTRAINT [DF_COMMENT_UPDATED_DATE] DEFAULT (CONVERT([datetime],'01/01/1900',(101))),

    CONSTRAINT [PK_Comment] PRIMARY KEY CLUSTERED

    (

    [CommentID] ASC

    )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]

    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

    END

    GO

    IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Category_Category]') AND parent_object_id = OBJECT_ID(N'[dbo].[Category]'))

    ALTER TABLE [dbo].[Category] WITH CHECK ADD CONSTRAINT [FK_Category_Category] FOREIGN KEY([ParentID])

    REFERENCES [dbo].[Category] ([CategoryID])

    GO

    ALTER TABLE [dbo].[Category] CHECK CONSTRAINT [FK_Category_Category]

    GO

    IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Post_Category]') AND parent_object_id = OBJECT_ID(N'[dbo].[Post]'))

    ALTER TABLE [dbo].[Post] WITH CHECK ADD CONSTRAINT [FK_Post_Category] FOREIGN KEY([CategoryID])

    REFERENCES [dbo].[Category] ([CategoryID])

    GO

    ALTER TABLE [dbo].[Post] CHECK CONSTRAINT [FK_Post_Category]

    GO

    IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_LinkCategory_Category]') AND parent_object_id = OBJECT_ID(N'[dbo].[LinkCategory]'))

    ALTER TABLE [dbo].[LinkCategory] WITH CHECK ADD CONSTRAINT [FK_LinkCategory_Category] FOREIGN KEY([LinkID])

    REFERENCES [dbo].[Category] ([CategoryID])

    GO

    ALTER TABLE [dbo].[LinkCategory] CHECK CONSTRAINT [FK_LinkCategory_Category]

    GO

    IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_LinkCategory_Link]') AND parent_object_id = OBJECT_ID(N'[dbo].[LinkCategory]'))

    ALTER TABLE [dbo].[LinkCategory] WITH CHECK ADD CONSTRAINT [FK_LinkCategory_Link] FOREIGN KEY([LinkID])

    REFERENCES [dbo].[Link] ([LinkID])

    GO

    ALTER TABLE [dbo].[LinkCategory] CHECK CONSTRAINT [FK_LinkCategory_Link]

    GO

    IF NOT EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_PostComment_Post]') AND parent_object_id = OBJECT_ID(N'[dbo].[PostComment]'))

    ALTER TABLE [dbo].[PostComment] WITH CHECK ADD CONSTRAINT [FK_PostComment_Post] FOREIGN KEY([PostID])

    REFERENCES [dbo].[Post] ([PostID])

    GO

    ALTER TABLE [dbo].[PostComment] CHECK CONSTRAINT [FK_PostComment_Post]

     

     

     

     

     

    • Post Points: 35
  • 11-24-2006 6:00 PM In reply to

    • swin
    • Top 10 Contributor
    • Joined on 06-14-2006
    • London, UK
    • Posts 921
    • Points 34,675

    Re: already defines a member called 'GetByLinkID' with the same parameter types

    thats normally caused when you have duplicate indexes.

    SQL 2006?? lucky boy!Big Smile

    swin

    -------------------------------------------------
    Member of the .NetTiers team
    -------------------------------------------------
    • Post Points: 60
  • 11-24-2006 6:47 PM In reply to

    • dmoon396
    • Not Ranked
    • Joined on 11-24-2006
    • Posts 3
    • Points 45

    Re: already defines a member called 'GetByLinkID' with the same parameter types

    Thanks for the quick response.

    I do not believe I have duplicate indexes on my LinkCategory table.

    Are there any other possible causes?

    • Post Points: 5
  • 11-24-2006 11:14 PM In reply to

    • dmoon396
    • Not Ranked
    • Joined on 11-24-2006
    • Posts 3
    • Points 45

    Re: already defines a member called 'GetByLinkID' with the same parameter types

    It took me a little while to spot my problem, and you were right, I did have two references to the same foreign key.

    Thanks for your help.

     

    --Dennis

    • Post Points: 5
Page 1 of 1 (4 items)
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems