?????????Щ???PRING??????????????????????ò??????????????????????????????XXX????????????????
private static string message = "";
public static string ExecuteNonQuery(string connextionString?? CommandType commandType?? string commandText?? bool outputMsg)
{
if (connextionString == null || connextionString.Length == 0) throw new ArgumentNullException("connectionString");
// Create & open a SqlConnection?? and dispose of it after we are done
using (SqlConnection connection = new SqlConnection(connextionString))
{
message = "";
connection.Open();
connection.InfoMessage += delegate(object sender?? SqlInfoMessageEventArgs e)
{
message += " " + e.Message;
};
// Call the overload that takes a connection in place of the connection string
if (connection == null) throw new ArgumentNullException("connection");
// Create a command and prepare it for execution
SqlCommand cmd = new SqlCommand(commandText?? connection); ;
cmd.CommandType = commandType;
// Finally?? execute the command
int retval = cmd.ExecuteNonQuery();
// Detach the SqlParameters from the command object?? so they can be used again
cmd.Parameters.Clear();
connection.Close();
return message;
}
}
???????ò???д????????????????????????????htm???????????HTML???棬????????????????????????????