ErikEJ / SqlCeToolbox

SQLite & SQL Server Compact Toolbox extension for Visual Studio, SSMS (and stand alone)
Other
843 stars 175 forks source link

Migration exception #530

Closed ZedZipDev closed 6 years ago

ZedZipDev commented 6 years ago

I have selected the SQL Server very simple database, click "Migrate to SQLite". The result is the MessageBox with long message: System.IndexOutOfRangeException: Index was outside of the bounds of array etc. The same error when I try to migrate to SqlCe.

  1. Microsoft SQL Server 2014 (SP2-GDR) (KB4019093) - 12.0.5207.0 (X64) Jul 3 2017 02:25:44 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)

  2. SSMS 17.3

  3. ToolBox: Version 4.7.390.0 SQL Server Compact 4.0 in GAC - Yes - 4.0.8876.1 SQL Server Compact 4.0 DbProvider - Yes SQL Server Compact 4.0 DDEX provider - No SQL Server Compact 4.0 Simple DDEX provider - No SQL Server Compact 3.5 in GAC - No SQL Server Compact 3.5 DbProvider - No SQL Server Compact 3.5 DDEX provider - No Sync Framework 2.1 SqlCe 3.5 provider - No SQLite ADO.NET Provider included: 1.0.105.1 SQLite EF6 DbProvider in GAC - No

  4. The test database is very simple, only 1 table: That is:

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[customers](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [forename] [nvarchar](50) NOT NULL,
    [surname] [nvarchar](50) NOT NULL,
    [initials] [nvarchar](50) NULL,
    [company] [nvarchar](50) NULL,
    [address] [nvarchar](256) NULL,
    [city] [nvarchar](64) NULL,
    [province] [nvarchar](50) NULL,
    [postcode] [nvarchar](24) NULL,
    [tel] [nvarchar](128) NULL,
    [fax] [nvarchar](128) NULL,
    [email] [nvarchar](128) NULL,
    [web] [nvarchar](128) NULL,
    [sales_contact] [nvarchar](128) NULL,
    [accounts_contact] [nvarchar](128) NULL,
    [legal_status] [int] NOT NULL,
    [marketing] [int] NOT NULL,
    [regnum] [nvarchar](64) NULL,
    [agent_id] [int] NULL,
    [mobile] [nvarchar](32) NULL,
    [yearest] [int] NULL,
    [type_of_business] [nvarchar](64) NOT NULL,
    [monthest] [int] NOT NULL,
    [sic] [nvarchar](256) NOT NULL,
    [tradingstyle] [nvarchar](256) NULL,
    [buildingname] [nvarchar](256) NULL,
    [streetnumber] [nvarchar](32) NULL,
    [streetname] [nvarchar](256) NULL,
    [district] [nvarchar](256) NULL,
    [towncity] [nvarchar](256) NULL,
    [county] [nvarchar](256) NULL,
    [ataddresssince] [datetime] NULL,
    [created] [datetime] NOT NULL,
    [modified] [datetime] NOT NULL,
    [modified_established] [datetime] NOT NULL,
PRIMARY KEY CLUSTERED 
(
    [id] ASC
)
GO

ALTER TABLE [dbo].[customers] ADD  DEFAULT ((0)) FOR [legal_status]
GO

ALTER TABLE [dbo].[customers] ADD  DEFAULT ((0)) FOR [marketing]
GO

ALTER TABLE [dbo].[customers] ADD  DEFAULT (N'') FOR [type_of_business]
GO

ALTER TABLE [dbo].[customers] ADD  DEFAULT ((0)) FOR [monthest]
GO

ALTER TABLE [dbo].[customers] ADD  DEFAULT (N'***') FOR [sic]
GO

ALTER TABLE [dbo].[customers] ADD  DEFAULT (getdate()) FOR [created]
GO

ALTER TABLE [dbo].[customers] ADD  DEFAULT (getdate()) FOR [modified]
GO

ALTER TABLE [dbo].[customers] ADD  DEFAULT (getdate()) FOR [modified_established]
GO

  1. If need I can send my db backup.
ErikEJ commented 6 years ago

Thanks for reporting this, it is fixed in the latest release on Marketplace (build 396)

ZedZipDev commented 6 years ago

Ok, thank you. When it will be available on Marketplace? There is build 390 on Marketplace.

ErikEJ commented 6 years ago

It is already on MarketPlace !? https://marketplace.visualstudio.com/items?itemName=ErikEJ.SQLServerCompactSQLiteToolboxforSSMS