2017-07-31 46 views
0
db.AddInParameter(dbCommand, "@updateMode", DbType.String, entCommon.UpdateMode); 
db.AddInParameter(dbCommand, "@requestNumber", DbType.String, entCommon.RequestNumber); 
db.AddInParameter(dbCommand, "@description", DbType.String, entCommon.Description); 
db.AddInParameter(dbCommand, "@RequestTypeID", DbType.String, entCommon.RequestTypeID); 
db.AddInParameter(dbCommand, "@requestPriorityID", DbType.String, entCommon.RequestPriorityID); 
db.AddInParameter(dbCommand, "@remarks", DbType.String, entCommon.Remarks); 
db.AddInParameter(dbCommand, "@requestedBy", DbType.String, entCommon.RequestedBy); 
db.AddInParameter(dbCommand, "@requestedDate", DbType.String, entCommon.RequestedDate); 
db.AddInParameter(dbCommand, "@approvedBy", DbType.String, entCommon.ApprovedBy); 
db.AddInParameter(dbCommand, "@approvedDate", DbType.String, entCommon.ApprovedDate); 
dbCommand.CommandTimeout = 0; 
DataSet dsData = null; 
dsData = db.ExecuteDataSet(dbCommand); 
+7

目前還不清楚你問什麼 –

+2

如果所有的參數都是'NULL',那麼不插入到數據庫簡單 –

+0

你需要在數據庫中插入NULL? – raichiks

回答

1

問題不明確!

如果要設置SQL參數空值 - 使用

... = DBNull.Value; 
+0

我怎樣才能構建它在我的用戶界面這裏是我的用戶界面的代碼; (txtBox_RNumber.Text!=「」&& txtBox_Des.Text!=「」) {0} EntCommon entCommon = new EntCommon(); DataTable dtInf = busCommon.InsertITRequests(entCommon); } –

+0

我真的不明白你的問題是什麼... –

相關問題