摘要:
我提供的某些参数为null直接在数据库里面运行存储过程没有问题vs调试时也是有参数的,只是有些参数值为 null 时有问题; 值不为null时,就没有问题。后来,自己摸索、百度了几个小时没有找到解决方案后来,我就从null和DBNull入手,在参数赋值前判断了一下,运行才没有问题,在参数赋给command时,要判断一下解决方案: if (parameters != null) { foreach (SqlParameter parameter in parameters) { ... 阅读全文
摘要:
GO/****** 对象: StoredProcedure [dbo].[pro_GenerateServiceFunction] 脚本日期: 08/04/2012 11:26:43 ******/IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[pro_GenerateServiceFunction]') AND type in (N'P', N'PC'))DROP PROCEDURE [dbo].[pro_GenerateServiceFunct 阅读全文
摘要:
GO/****** 对象: StoredProcedure [dbo].[pro_GenerateProGet] 脚本日期: 08/03/2012 11:26:43 ******/IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[pro_GenerateProGet]') AND type in (N'P', N'PC'))DROP PROCEDURE [dbo].[pro_GenerateProGet]SET ANSI_NULLS ONGOSET 阅读全文
摘要:
GO/****** 对象: StoredProcedure [dbo].[pro_GenerateProSet] 脚本日期: 08/03/2012 11:26:43 ******/IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[pro_GenerateProSet]') AND type in (N'P', N'PC'))DROP PROCEDURE [dbo].[pro_GenerateProSet]SET ANSI_NULLS ONGOSET 阅读全文
摘要:
GO/****** 对象: StoredProcedure [dbo].[pro_GenerateModel] 脚本日期: 08/04/2012 11:26:43 ******/IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[pro_GenerateModel]') AND type in (N'P', N'PC'))DROP PROCEDURE [dbo].[pro_GenerateModel]SET ANSI_NULLS ONGOSET QUO 阅读全文