My table name is Customer
. It has four columns
CustomerId
CustomerName
CustomerAddress
PhoneNo
This is my c# code. I am not ge
What you say simply doesn't happen. Either the query will insert a record, or you will get an exception.
There is an error in your query, though. There shouldn't be apostrophes around the @CustAdd
parameter, that will make the database interpret that as a literal string, not a parameter:
string query = "insert into Customer(CustomerName,CustomerAddress,PhoneNo) values (@CustNm,@CustAdd,@Ph)";
I'm not certain how the database would react, but you would either get an exception telling you that you have a parameter that is never used in the query, or it would insert a record with the value @CustAdd
as the address.