| Author |
Message |
urs.meili
Joined: 13 Jan 2009 Posts: 9
|
Posted: Wed Feb 20, 2013 8:46 am Post subject: Invalid Index specification leads to exception |
|
|
Hi,
I have the following SQL script which SQL Compare is processing using the "compare with files" option:
CREATE TABLE [dbo].[tblMutationHistory]
(
[IDMutationHistory] [int] NOT NULL IDENTITY(1, 1),
[MHistObjArt] [smallint] NOT NULL,
[MHistObjKey1] [int] NOT NULL,
[MHistObjKey2] [int] NULL,
[MHistTimeStamp] [datetime] NOT NULL DEFAULT (getdate()),
[MHistIdBenutzer] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MHistGrund] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MHistMutation] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[MHistObjKey3] [int] NULL,
[MHistGuid] [uniqueidentifier] NULL -- Eindeutige GUID für diesen Mutationhistory-Eintrag
)
ALTER TABLE [dbo].[tblMutationHistory] ADD CONSTRAINT [PK__MutationHistory__3521D83F] PRIMARY KEY CLUSTERED ([IDMutationHistory])
CREATE NONCLUSTERED INDEX [MHistObjArt] ON [dbo].[tblMutationHistory] ([MHistObjArt])
CREATE NONCLUSTERED INDEX [MHistObjKey1] ON [dbo].[tblMutationHistory] ([MHistObjKey1])
CREATE NONCLUSTERED INDEX [MHist_GuidMutationHistory] ON [dbo].[tblMutationHistory] ([GuidMutationHistory])
This results in an exception "Failed to compare two elements in the array." within SQL Compare 10 (API).
The reason seems to be that the field in the index [MHist_GuidMutationHistory] is wrongly named ("[GuidMutationHistory]" instead of "[MHistGuid]".
I corrected the error in the script. However, it would be a good idea if SQL Compare would print a decent error message instead of just quitting with an arbitrary exception. |
|
| Back to top |
|
 |
Manfred.Castro
Joined: 23 Apr 2012 Posts: 122
|
Posted: Tue Feb 26, 2013 10:46 pm Post subject: |
|
|
Thank you for reporting this issue to us.
I have logged your issue in our bug tracking system under the internal reference number SC-6223. _________________ Manfred Castro
Product Support
Red Gate Software |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group