在执行语句:
select 'set identity_insert test.dbo.CarSchema on'
select 'insert test.dbo.CarSchema(ElementId,BussNo,SGNo,TabName,FldName,ElementKey,Caption,FldType,FldLen,DigLen,IsKeep,ShowOrd,NewEnable,EditEnable,DefaultText,ValList,DispWidth)'+char(13)+char(2)+
'values('+''''+convert(varchar(300),isnull(ElementId,''))+''''+','+''''+convert(varchar(300),isnull(BussNo,''))+''''+','+''''+convert(varchar(300),isnull(SGNo,''))+''''+','+''''+convert(varchar(300),isnull(TabName,''))+''''+','+''''+convert(varchar(300),isnull(FldName,''))+''''+','+''''+convert(varchar(300),isnull(ElementKey,''))+''''+','+''''+convert(varchar(300),isnull(Caption,''))+''''+','+''''+convert(varchar(300),isnull(FldType,''))+''''+','+''''+convert(varchar(300),isnull(FldLen,''))+''''+','+''''+convert(varchar(300),isnull(DigLen,''))+''''+','+''''+convert(varchar(300),isnull(IsKeep,''))+''''+','+''''+convert(varchar(300),isnull(ShowOrd,''))+''''+','+''''+convert(varchar(300),isnull(NewEnable,''))+''''+','+''''+convert(varchar(300),isnull(EditEnable,''))+''''+','+''''+convert(varchar(300),isnull(DefaultText,''))+''''+','+''''+convert(varchar(300),isnull(ValList,''))+''''+','+''''+convert(varchar(300),isnull(DispWidth,''))+''''+')' from CarSchema
select 'set identity_insert test.dbo.CarSchema off'
时出现错误
ODBC: Msg 0, Level 19, State 1
SqlDumpExceptionHandler: Process 7 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process.Connection Broken
我怀疑是语句太长,但又不知如何解决,请高手指教!
|