anandhirv / aseisql

Automatically exported from code.google.com/p/aseisql
0 stars 0 forks source link

Stubs.sql ( <Menu\Table DDL> ) error on tables with "sp_bindefault" #88

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
both sp_bindefault and grant statements are hard-coded as id_part 6,  this 
causes a unique-index error on #tmp

Fix: change:
insert into #tmp  values (@id,  6, @colid, 'exec sp_bindefault 
'''+@default+''', '''+@tabname+'.'+@colname+''''+char(10)+'go'+char(10) )

to 

insert into #tmp  values (@id,  7, @colid, 'exec sp_bindefault 
'''+@default+''', '''+@tabname+'.'+@colname+''''+char(10)+'go'+char(10) )

Original issue reported on code.google.com by bcr...@gmail.com on 10 Apr 2012 at 9:09