ErikEJ / SqlCeToolbox

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

When exporting database schema from Sql Server NVARCHAR(max) becomes NTEXT #542

Closed HillMountain closed 6 years ago

HillMountain commented 6 years ago

When exporting database schema from Sql Server NVARCHAR(max) becomes NTEXT. See attached screenshot.

Steps to reproduce

Create a tablein Sql Server with a column definition NVARCHAR(MAX). Then open Sql Server Compact Toolbox in VS and connect to Sql Server. Right-click, choose Script database and Script Database Schema.

Further technical details

Version 4.7.234.0 SQL Server Compact 4.0 in GAC - No SQL Server Compact 4.0 DbProvider - No SQL Server Compact 4.0 DDEX provider - No SQL Server Compact 4.0 Simple DDEX provider - Yes 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

Database engine: SQL Server

Visual Studio or SSMS version: VS 2017 Prof. (15.3.3)

image

ErikEJ commented 6 years ago

This is by design - the schema is scripted in order to be compatible with SQL Server Compact, which does not support nvarchar(MAX) data type. (This should also be indicated by the Tooltip on the menu item). If you just want plain scripting of a SQL Server database schema, use the scripting tools in SQL Server Management Studio (SSMS)