G
Guest
I want to delete a row in database using SQL delete statement, with
parameters and Executenonquery capturing the return to confirm the number of
rows deleted. I code this in a standard way such as "Delete From Clients
Where ClientID = @ClientID And FName = @OldFname...." The paramters are
assigned in With statements like:
..Add("@ClientID", sqldbtype.int)
..Parameters("@ClientID").value = client.clientID
The error I keep getting is that the variable name @ClientID must be unique...
I don't know if it matters but ClientID is the primary key for this table.
I have tried some variations including just listing the ClientID field in
the SQL Statment. While this in fact deleted the row in the database,
Executenonquery returned a 0 showing no rows changed.
Any suggestions or tips would be appreciated.
parameters and Executenonquery capturing the return to confirm the number of
rows deleted. I code this in a standard way such as "Delete From Clients
Where ClientID = @ClientID And FName = @OldFname...." The paramters are
assigned in With statements like:
..Add("@ClientID", sqldbtype.int)
..Parameters("@ClientID").value = client.clientID
The error I keep getting is that the variable name @ClientID must be unique...
I don't know if it matters but ClientID is the primary key for this table.
I have tried some variations including just listing the ClientID field in
the SQL Statment. While this in fact deleted the row in the database,
Executenonquery returned a 0 showing no rows changed.
Any suggestions or tips would be appreciated.