如果還是不行,那么就在SQL Server管理器中找到這三個(gè)表:mis_official_document、mis_official_doctype、mis_official_document_receive刪除,然后用下面這三個(gè)SQL語(yǔ)句在SQL Server管理器中重新創(chuàng)建即可:
if not exists (select * from dbo.sysobjects where id=object_id(N''[dbo].[mis_official_document]'') and OBJECTPROPERTY(id, N''IsUserTable'')=1) CREATE TABLE [dbo].[mis_official_document]([id] [int] IDENTITY(1,1) NOT NULL,[title] [nvarchar](50),[doc_type] [nvarchar](50),[organizer] [nvarchar](50),[doc_no] [int] NULL,[personal_doc_no] [int] NULL,[send_doc_no] [nvarchar](50),[content] [ntext],[importance] [nvarchar](50),[urgency] [nvarchar](50),[writer] [nvarchar](50),[writerdept] [nvarchar](50),[writerdept_name] [nvarchar](50),[proofreader] [nvarchar](50),[proofreader_en] [nvarchar](50),[sendto_zhusong] [nvarchar](1000),[sendto_zs_username] [nvarchar](1000),[sendto_zs_position_cn] [nvarchar](1000),[sendto_zs_position] [nvarchar](2000),[sendto_chaosong] [nvarchar](1000),[sendto_cs_username] [nvarchar](1000),[sendto_cs_position_cn] [nvarchar](1000),[sendto_cs_position] [nvarchar](2000),[input_time] [datetime] DEFAULT (getdate()),[status] [int] NULL,[receive_status] [int] NULL,[send_code_name] [nvarchar](50),[template_id] [int] NULL,[out_order_id] [nvarchar](50),CONSTRAINT [PK_mis_official_document] PRIMARY KEY CLUSTERED ([id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];
if not exists (select * from dbo.sysobjects where id=object_id(N''[dbo].[mis_official_doctype]'') and OBJECTPROPERTY(id, N''IsUserTable'')=1) CREATE TABLE [dbo].[mis_official_doctype]([id] [int] IDENTITY(1,1) NOT NULL,[doc_typename] [nvarchar](20),[association] [nvarchar](2000),[association_id] [nvarchar](2000),[popedom] [int] NULL,[brower_popedom] [nvarchar](2000),[popedom_dept_only] [nvarchar](2000),[popedom_dept_like] [nvarchar](2000),[popedom_level_only] [nvarchar](2000),[popedom_level_like] [int] NULL,[popedom_position_only] [nvarchar](2000),[popedom_position_like] [nvarchar](2000),[popedom_user] [nvarchar](2000),[input_time] [datetime] NULL,[inputor] [nvarchar](50),[edit_time] [datetime] NULL,[editor] [nvarchar](20),[remark] [nvarchar](50), CONSTRAINT [PK_mis_official_doctype] PRIMARY KEY CLUSTERED ([id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY];
if not exists (select * from dbo.sysobjects where id=object_id(N''[dbo].[mis_official_document_receive]'') and OBJECTPROPERTY(id, N''IsUserTable'')=1) CREATE TABLE [dbo].[mis_official_document_receive]([id] [int] IDENTITY(1,1) NOT NULL,[offic_doc_id] [int] NULL,[title] [nvarchar](50),[receive_date] [datetime] NULL,[receiver] [nvarchar](50),[organizer] [nvarchar](50),[doc_type] [nvarchar](50),[doc_receive_no] [int] NULL,[doc_receive_no_flag] [int] NULL,[executor] [nvarchar](1000),[executor_en] [nvarchar](1000),[executor_ps] [nvarchar](1000),[executor_ps_code] [nvarchar](2000),[receive_code_name] [nvarchar](50),[send_code_name] [nvarchar](50),[send_year] [nvarchar](10),[send_doc_no] [nvarchar](50),[personal_doc_no] [int] NULL,[receive_doc_no] [nvarchar](50),[content] [ntext],[status] [int] NULL,[out_order_id] [nvarchar](50),[executor_sum] [int] NULL,[executor_completed] [int] NULL,[already_setexecutor] [int] NULL,CONSTRAINT [PK_mis_official_document_receive] PRIMARY KEY CLUSTERED([id] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];
該評(píng)論在 2018/7/13 11:01:12 編輯過(guò)