我的存储过程如下所示:
CREATE PROCEDURE [dbo].[insertCompList_Employee]
@Course_ID int,
@Employee_ID int,
@Project_ID int = NULL,
@LastUpdateDate datetime = NULL,
@LastUpdateBy int = NULL
AS
BEGIN
SET NOCOUNT ON
INSERT INTO db_Competency_List(Course_ID, Employee_ID, Project_ID, LastUpdateDate, LastUpdateBy)
VALUES (@Course_ID, @Employee_ID, @Project_ID, @LastUpdateDate, @LastUpdateBy)
END
我的asp.net vb代码后面如下:
dc2.insertCompList_Employee(
rdl_CompList_Course.SelectedValue,
RadListBox_CompList_Select.Items(i).Value.ToString,
"0",
DateTime.Now,
HttpContext.Current.Session("UserID")
)
我想插入一个null
值Project_ID
而不是0
我试过了NULL
,'NULL'
但它返回错误。