internal static void uploadFile(Attachment aAttachment)
{
using (SqlConnection objConnection = new SqlConnection(_connectionstring))
{
using (SqlCommand objCommand = CreateSqlCommand("Attachment", objConnection))
{
objCommand.Parameters.Add("@FileName", SqlDbType.VarChar, 300).Value = aAttachment.FileName;
objConnection.Open();
objCommand.ExecuteNonQuery();
}
}
}
|