|
I heard that using stored procedures is a good programming practice and a more standardized programming method, but I feel that it is too cumbersome. It affects the work efficiency too much, and every time I manually write the stored procedure and then execute (the parameters must be set Come and set), it is really not as fast as writing sql and then executing it.
For example, I used sql to do the above:
string sql = "INSERT INTO SpecialTicket (ticketName) VALUES (" '"+ title.Text +"') ";
SqlCommand myCommand = new SqlCommand (sql, myConnection);
myConnection.Open ();
myCommand.ExecuteNonQuery ();
myConnection.Close (); |
|