问题描述
解决方案
你数据库的表时怎么创建的?
解决方案二:
USE [lmweb]
GO
/****** Object: Table [dbo].[visitip] Script Date: 10/09/2015 21:32:55 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].visitip NOT NULL,
[ffromrefid] nvarchar NULL,
[ffromusername] nvarchar NULL,
[fip] nvarchar NULL,
[fpv] [int] NULL,
[fdate] [smalldatetime] NULL,
[ftimefirst] [datetime] NULL,
[ftimelast] [datetime] NULL,
[fisjsed] [bit] NULL,
[ptid] [int] NULL,
CONSTRAINT [PK_visitip] PRIMARY KEY CLUSTERED
(
[fid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被访问的用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'visitip', @level2type=N'COLUMN',@level2name=N'ffromrefid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被访问的用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'visitip', @level2type=N'COLUMN',@level2name=N'ffromusername'
GO
ALTER TABLE [dbo].[visitip] ADD CONSTRAINT [DF_visitip_fpv] DEFAULT ((0)) FOR [fpv]
GO
ALTER TABLE [dbo].[visitip] ADD CONSTRAINT [DF_visitip_fischeck] DEFAULT ((0)) FOR [fisjsed]
GO
ALTER TABLE [dbo].[visitip] ADD CONSTRAINT [DF_visitip_ptid] DEFAULT ((0)) FOR [ptid]
GO
解决方案三:
insert into 表名。错误提示很清晰,先比对一下数据类型和字段,存储过程不对劲
解决方案四:
字段名和存储过程调出来看看呗!