2013-06-28 92 views
0

我正在使用表適配器方法來更新數據庫上的數據,我正在更新兩列,但一列無法正確更新其他列更新..這是什麼原因?我該如何解決這個問題?請幫助..表適配器更新失敗

這裏是SP

USE [PNSBL7Data] 
GO 
/****** Object: StoredProcedure [dbo].[EmpOTApr_Update] Script Date: 6/28/2013 9:25:54 AM ******/ 
SET ANSI_NULLS ON 
GO 
SET QUOTED_IDENTIFIER ON 
GO 
ALTER PROCEDURE [dbo].[EmpOTApr_Update] 
-- Add the parameters for the stored procedure here 

@AtnDetKy bigint, 
@AprOT bigint, 
@isAprOTMin bit 

AS 
--declare @AprOt bigint 
--declare @AtnDetExtKy bigint 

--set @AtnDetExtKy = 112 
--set @AprOt = 25 
--SET NOCOUNT OFF; 

UPDATE AtnDetExt SET [email protected] ,AprOTMins = @AprOT 

WHERE  (AtnDetKy = @AtnDetKy) 

SELECT  EmpMas.EmpNo, EmpMas.EmpNm, AtnDet.AtnDt, AtnDet.EmpKy, AtnDet.InDtm, AtnDet.OutDtm, AtnDetExt.OT1Mint AS NorOT, AtnDetExt.OT2Mint AS DouOT, 
        AtnDetExt.OT3Mint AS TriOT, AtnDetExt.AprOTMins, AtnDet.AtnDetKy 
FROM   AtnDet INNER JOIN 
        AtnDetExt ON AtnDet.AtnDetKy = AtnDetExt.AtnDetKy INNER JOIN 
        EmpMas ON AtnDet.EmpKy = EmpMas.EmpKy 
WHERE  (AtnDet.AtnDetKy = @AtnDetKy) AND (AtnDetExt.AprOTMins = @AprOT) 

這裏的表適配器更新

image

+0

isAprOT列正在更新,但AprOT會不會?請幫助.. – TAB

回答

0

檢查DB和該適配器的數據類型。它應該正確映射。還有一件事是檢查源代碼版本。

+0

謝謝..更改源版本後默認工作.. – TAB