Phone = @Phone
WHERE (CustomerID = @Original_CustomerID)
AND (Address = @Original_Address OR @Original_Address IS NULL
AND Address IS NULL )
AND (City = @Original_City OR @Original_City IS NULL AND City IS NULL)
AND (CompanyName = @Original_CompanyName)
AND (ContactName = @Original_ContactName OR @Original_ContactName IS NULL
AND ContactName IS NULL )
AND (ContactTitle = @Original_ContactTitle OR @Original_ContactTitle IS NULL
AND ContactTitle IS NULL )
AND (Country = @Original_Country OR @Original_Country IS NULL
AND Country IS NULL )
AND (Fax = @Original_Fax OR @Original_Fax IS NULL AND Fax IS NULL)
AND (Phone = @Original_Phone OR @Original_Phone IS NULL AND Phone IS NULL)
AND (PostalCode = @Original_PostalCode OR @Original_PostalCode IS NULL
AND PostalCode IS NULL )
AND (Region = @Original_Region OR @Original_Region IS NULL
AND Region IS NULL );
SELECT CustomerID
Address
FROM Customers
WHERE (CustomerID = @ CustomerID)
this
this
new System
System
// Other Paramaters omitted for clarity
這些命令中的主要部分是已經生成的SQL
這些看起來多余的子句是使客戶機上的數據與服務器上數據重新保持同步的一種方式
對於包含IDENTITY列的表
向導生成的代碼可以工作
[
From:http://tw.wingwit.com/Article/program/net/201311/15421.html