cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SaberRider
Level 5

BUG in SQL Script generator

Hi,

I just had to find out that there's a bug in the SQL script generator.


IS 2010 creats a tablecolumn using this statement:


  • [Buffer] [varbinary] (-1) NULL


SQL Management Studio 2008 creates the same column using this correct statement:


  • [Buffer] [varbinary] (MAX) NULL



Using -1 instead of MAX forces the SQL script to fail, the script also didn't pass the Management Studio syntax test.

I had some real "fun" figuring that bug out 😞

Greetings,
Gøran
Labels (1)
0 Kudos
(1) Reply
hidenori
Level 17

This is a known issue and it has been filed under the work order #IOA-000028493 to take into consideration for a future release.

The problem is that the Microsoft SQL Server Distributed Management Objects (SQL-DMO) used for the Database Import functionality does not recognize that data type. We will probably need to rewrite the functionality using Microsoft SQL Server Management Objects (SQL-SMO).

The way around this issue is to use the Text Replacement feature to replace:

[varchar] (-1) with [varchar] (max)
[nvarchar] (0) with [nvarchar] (max)

Regards.
0 Kudos