"John" <Jo**@discussions.microsoft.com> schrieb:
How can I use the DeleteCommand to delete a record where the delete
statment
takes a CustomerID as a parameter (CustomerID is the variable that holds
Customer ID taken from a TextBox)
Sample (look for "DELETE FROM"):
..NET Framework Class Library -- 'SqlDataAdapter' Constructor ('SqlCommand')
<URL:http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDataSqlClientSqlDataAdapterClassctorTop ic2.asp>
Note that this sample shows how to use a parameterized command. This
approach is recommended over building up the whole command string by hand
because it protects from SQL injection.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>