T
Tony qu
If I generate DataAdapter.UpdateCommand by myself, can I use the following
sql sentence as UpdateCommand
UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName,
ContactName = @ContactName, ContactTitle = @ContactTitle WHERE (CustomerID =
@Original_CustomerID) 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)
because in DeleteCommand,the value of @Original_XXX parameters can be obtain
from database by using timestamp. But in fact, I failed to do so. The mssql
return a error says "Incorrect syntax near CustomerID". Do you know why?
Thanks for your help in advance.
sql sentence as UpdateCommand
UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName,
ContactName = @ContactName, ContactTitle = @ContactTitle WHERE (CustomerID =
@Original_CustomerID) 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)
because in DeleteCommand,the value of @Original_XXX parameters can be obtain
from database by using timestamp. But in fact, I failed to do so. The mssql
return a error says "Incorrect syntax near CustomerID". Do you know why?
Thanks for your help in advance.