Buy essay papers
Monday, August 24, 2020
Saturday, August 22, 2020
The Edutained American Essays - MTV, Now You See It, Brain Rules
The Edutained American The ?Edutained? American You may attempt to deny it; a significant number of us do. We are our own kin, with our own musings, sentiments, and conclusions. We are people, and nothing impacts us without our insight and authorization. Absolutely not the media; we make the media, all things considered, and direct it with our own tastes and inclinations. It is simply a piece of our lives, a not very inescapable part. We state this with total conviction and still realize that we lie. For the media isn't a piece of our lives, it is our lives. It guides us, moves us towards what its makers, executives and backers need us to see. All that we do isn't media affected, it is media-directed. Here and there, our cutting edge data frameworks are useful. They are, all things considered, educational. From these frameworks we learn, we process the data they welcome on recent developments, mainstream culture, and each other subject known to man. Be that as it may, the data is corrupted. It is separated through the corporate patrons and the plans of the individuals who carry it to us. In this manner we bow to the assessments of the individuals who give us our insight regarding each matter they open us to, from the garments we purchase, to the music we tune in to, the movies we see, books we read, government officials we vote in favor of, religions we put stock in. Our contemplations are not our own. I don't get this' meaning to the world where we live? How does this impact our pioneers, our schools and our families? Furthermore, in a general public so saturated with media, how would we recover ourselves? Section One: What are our persuasions? For a considerable lot of us who go to school now, the media has been around us since birth. The TV was a powerful sitter, and we grew up acclimated with the brisk, joke-a-minute style of kid's shows and circumstance comedies. With the appearance of MTV in 1981, we figured out how to assimilate data through the two and brief stories offered on that channel, just as VH1 and Wager. These channels opened to us a world that the greater part of our folks basically didn't see as kids. One hour of MTV's Total Request Live can show a kid a re-sanctioning of JFK's death, done by Marylin Manson, in one of the most mainstream recordings of the week. The expressions of the melody, anyway evident and applicable they might be, are lost in the picture, in closeup and moderate movement. Vidoes by pop groups, while less fierce, are no less upsetting in their generalization of people and in their movement affliction prompting, fast fire pictures. They take into account an age that as of now experiences abbreviated abilities to focus by giving spinning sights that can be effectively comprehended in the half-second they are appeared. They show a universe of outrage, savagery and negativity. Valid, they regularly mirror the emotions and activities in parts of the country, yet in addition bring those to seeing naive kids who might not in any case have known about it until they were a lot more established. At a similar time, the video-sitter isolates kid from parent and makes us hesitant to ask what these pictures implied. All things considered, we are directed to relate to the performers and models in the recordings, also, they regularly guarantee us that our folks don't comprehend and can't be trusted. The data we absorb through these vignettes by and large point to a particular arrangement of values, at chances with those of our folks. While they request regard and submission sensibly speaking, we discover that grown-ups are the outcasts, the aim of jokes and objects of scorn, presumably not very brilliant either. The normal network shows that we plunk down to watch, frequently with our folks, are very little better. It has gotten a lot cooler to oppose and be contemptuous than to tune in. This is absolutely the same old thing, one need just glance at the flappers of the 1920s to see that energetic resistance has been around for whatever length of time that anybody still alive can recall. It seems, notwithstanding, that the juvenile extravagance and opposition of the Baby Boomer age became something totally different for their youngsters, something darker and risky. Obviously, the TV that they were raised with focused on antiquated family values: regard for older folks, consideration to neighbors, get your work done, eat your broccoli. The shows that kids and youthful grown-ups observe now are altogether different. We see affronts tossed left and right, particularly
Contemporary issues in human resource management Assignment
Contemporary issues in human asset the board - Assignment Example The investigation targets featuring the contemporary issues engaged with human asset the board, for example, segregations, work pressure, security issues, passionate work, decent variety, and representative burnout. In this report explicitly the issue of Virgin Australia Airline has been picked and their new strategy of not permitting male travelers to sit adjacent to youngsters, as they are viewed as dangerous. This arrangement was viewed as a segregation approach of Virgin Airlines, by its male client. In such cases the job of human asset the executives and the office should be assessed. Human asset the board (HRM) assumes a significant job in the advancement of present day economies. The distinction among created and creating nations lies in contrast in their HR, in any case the vast majority of the assets are same. It has been seen that however misusing the money related, physical, regular assets are significant in present day times, yet none of them are as significant as submitted and effective work power. It is frequently said that the vast majority of the improvement originate from the human personalities (Robbins, and Coulter, 2008, p. 366-367). The conventional significance of HRM was because of the enrollment and determination process which they took care of, however now a vital methodology of HRM in organization, faculty the executives and different achievements have made the job of HRM groundbreaking in associations. There are various extra jobs that the human asset division of the organization needs to regulate alongside staffing and choice of the workers. These jobs incorporates preparing the workers, observing execution of the representative for evaluation, work examination, determining the compensation for a specific activity position.., assigning motivators for good execution, dealing with the worker advantage approaches of the organization, going about as a correspondence channel between the representatives and the top level administration, creating representative government assistance, wellbeing and medicinal services plans, dealing with advancements, moves, keeping up modern connections, taking care of the issues of the Trade Union, comprehending debates inside the representatives or divisions, surveying the moral issues in the office or association, and so forth (Aswathappa, 2008, p. 5-6). The human asset division likewise has the obligation to guarantee that sexual orientation segregati on doesn't win in the association based on sex, as indicated by the Civil Rights Act 1964 (Kurtz, and Boone, 2008, p. 54). Issue Areas This segment includes the contemporary issues of human asset concerning Virgin Australia Airline. The organization has as of late looked into its approaches wherein they have limited men to sit alongside kids on the flights. The arrangement
Friday, August 21, 2020
Management Assignment
Task File 1 Assignment 1 Due date: 26 November 2012 Coverage: Units 1ââ¬2 Length: The absolute length of the exposition type questions ought not surpass 2,000 words. Those surpassing the upper word breaking point will be carefully punished. Question 1 (20 imprints) For every one of the accompanying ten sub-questions, select the most appropriate answer. Each right answer is worth two imprints. 1 Basket Maker utilizes telephone studies to accumulate client criticism about help and quality. This is a case of the administration capacity of ________. An arranging B driving C sorting out D controlling Paul Chan is the President of WV Railroad. His association faces issues identified with the earth, government guideline, and rivalry. He should depend fundamentally on his ________. A theoretical abilities B specialized aptitudes C human abilities D controlling abilities 3 Which of coming up next isn't a case of a voting public that makes up the particular condition? A clients B socio-socia l variables C providers D contenders 2 MGT B240 Principles and Practices of Management 4 Which of these is a significant analysis of logical management?A It disregarded the effect of remuneration on execution. B It overemphasized singular contrasts. C It overemphasized the knowledge of laborers. D It overlooked the social setting of work. 5 Bierderlack has an arrangement expressing that multiple unlucky deficiencies in a six-month time frame will bring about a suspension. Erin, the chief, has recently chosen to suspend one of her work day representatives for disregarding this strategy. This is a case of ________. An a customized choice B a nonprogrammed choice C a unimportant choice D poor administration 6 Kari is a supervisor at MySize Clothing.Her work is perplexing and she feels that she needs more time to recognize and additionally process all the data she needs to decide. Kariââ¬â¢s circumstance is generally steady with which of the accompanying ideas? A limited soundness B the old style model of dynamic C conceptualizing D logical administration 7 Which of coming up next is a case of a system? A Without special case, all workers in client confronting jobs must be officially attired consistently. B Before going on a time away, fill in the application structure accessible on the companyââ¬â¢s online leave the executives system.All applications will be endorsed/dismissed inside two days by the employeeââ¬â¢s prompt boss. C We advance from inside, at whatever point conceivable. Whenever qualified candidates are accessible inside, work posting will be given by the HR office giving the important insights regarding all opening. D Employees working with power instruments must wear wellbeing glasses consistently. Task File 3 8 Sophie is responsible for enrollment at her organization. During a specific meeting, the principal thing Sophie saw about the candidate was that he was inappropriately attired.Though the up-and-comer had the vital capabilities and viably responded to every one of her inquiries, Sophie dismissed him. This is a case of the ________. An irregularity predisposition B self-serving inclination C mooring impact D portrayal predisposition Read the accompanying situation and afterward answer addresses 9 to 10: Tom has quite recently been elevated to boss innovation official at his organization, Global Tech Solutions, Inc. His first task is to recognize four venture chiefs in the organization who are probably going to effectively oversee new undertakings. Tom chooses Robert, Frank, Sue, and Jan, who all are ongoing alumni from a nearby university.He advises them about a present circumstance. 9 During a conversation about e-business, Robert reveals to Tom that he comprehends that e-business is a thorough term portraying the manner in which an association accomplishes its work by utilizing ________ so as to proficiently and viably accomplish its objectives. A globalization of the commercial center B advancement and devel opment C electronic linkages with key voting public D enterprise and authority aptitudes 10 Discussing the three classes of e-business was not troublesome. Tom essentially expressed that the three classes incorporated the entirety of the accompanying aside from ________.A e-business upgraded B e-business empowered C complete e-business D cross-sectional e-business 4 MGT B240 Principles and Practices of Management Question 2 (20 denotes) an In your own words, clarify why the Hawthorne Studies were so basic to the board history. (10 imprints) Read the accompanying article and afterward answer the inquiries beneath the crate: News of Steve Jobsââ¬â¢s demise on Wednesday, 5 October 2011 drove the Apple Inc. (Apple) share cost down over 5% on the Frankfurt financial exchange the next morning. Steve Jobs is Appleââ¬â¢s fellow benefactor and ex-CEO.Jobs was expelled from the organization in 1985 and proceeded to work another business, movement studio Pixar, before coming back to Appl e in 1997. Apple was close to insolvency at that point and worth just $2 billion. In any case, at that point it concocted numerous inventive and well known items including iPods, iPhones and iPads. Occupations is viewed as the brains behind this domain of items that upset figuring, communication and the music business. Appleââ¬â¢s stock cost has risen over 9,000% since Jobs returned in 1997. Tim Cook, who took over as new CEO in August 2011, additionally wound up being the most generously compensated CEO in America.Cookââ¬â¢s pay bundle was esteemed at more than the entirety of the following nine most generously compensated CEOs of 2010 joined (in US), at about $356 million. Required: Explain whether the partners of Apple Inc. hold the supreme view or the emblematic perspective on managersââ¬â¢ powers. What negative outcome may come about because of maintaining the specific perspective recognized from the article? (Indication: Your conversation should draw on applicable dat a from the article, for example, the stock execution and the compensation bundle for Jobsââ¬â¢ replacement. ) (10 imprints) b Question 3 (30 imprints) Discuss how a director can utilize the significant information about Hofstedeââ¬â¢s national culture structure to all the more likely oversee laborers/subordinates who originated from: I a powerful separation culture; ii a low vulnerability shirking society; or iii an individualistic culture. (15 imprints) Assignment File 5 b Read the accompanying short article and afterward answer the inquiries underneath the container: On 13 December 2011, Hongkong Electric Ltd and China Light and Power HK Ltd (CLP) declared force rate increments higher than the pace of swelling. Hongkong Electric said it would raise rates by 6. 3%. CLP introduced a 9. % expansion, viable 1 January 2012. The size of the increments started far reaching disappointment in the domain. The Chief Executive, Donald Tsang, encouraged both force organizations to think about their social obligation and to guarantee they donââ¬â¢t cause hardship to the general population with their proposed duty increments. Bowing to open weight, CLP later brought down its arranged increment to 7. 4% by deducting the expansion for fuel cost. Required: CLPââ¬â¢s activity to decrease its arranged tax climb is generally perfect with which of the accompanying thoughts? Clarify and expound your view on every thought. social commitment; ii social responsiveness; or iii social obligation. (15 imprints) Question 4 (30 imprints) Read the accompanying case and answer the inquiries that follow: Case: Out of control With an overall review of nearly 8 million vehicles and 51 passings that US controllers state have been brought about by mechanical disappointments in its vehicles, Toyota Motor Corporation faces a corporate emergency of incredible scale. What occurred at the vehicle organization that had at long last accomplished the title of worldââ¬â¢s biggest vehicle p roducer? (It overwhelmed General Motors in 2008. ) What components added to the wreckage it currently got itself in?At the center of Toyotaââ¬â¢s fabricating ability is the Toyota Production System (TPS), which has for some time been touted and loved as a model of corporate effectiveness and quality. Four administration standards (the 4P model) were at the center of TPS and guided representatives: critical thinking, individuals and accomplices, procedure, and reasoning. The thought behind these standards was that ââ¬ËGood Thinking implies Good Product. ââ¬â¢ Taiichi Ohno, a long-lasting Toyota official, is generally credited as the imaginative virtuoso behind TPS. During the 1950s, Ohno, alongside a little 6 MGT B240 Principles and Practices of Management mineral of other Toyota officials, built up a few standards of vehicle making proficiency that became what is currently known as lean assembling and in the nick of time stock administration. ââ¬ËOhnoââ¬â¢s thoughts n ot just changed the vehicle business, they changed latetwentieth-century producing. ââ¬â¢ At the very center of these ideas were tender loving care and a ââ¬Ënoble cheapness. ââ¬â¢ However, throughout the years, apparently Toyotaââ¬â¢s officials gradually lost the ââ¬Ëpurityââ¬â¢ of that approach as the once-solid duty to quality implanted in Toyotaââ¬â¢s corporate culture got lost in its forceful moves to develop piece of the overall industry and accomplish profitability gains.From around 1995 to 2009, Toyota set out on the ââ¬Ëmost forceful abroad extensions in car historyââ¬â¢ and simultaneously had a laser-like unrivaled spotlight on reducing expenses. Four significant cost-cutting and development activities seriously stressed authoritative procedures and representatives. One activity was restricted assembling. Begun in the late 1990s, Toyota set up assembling center points in Asia, North America, and Europe. Such a methodology implied depending more o n nearby providers and configuration groups to tailor vehicles to neighborhood tastes.Another activity was called Construction of Cost Competitiveness for the 21st Century, or CCC21. It was an enormous cost decrease program. Through a continuous procedure of upgrading parts and working with providers, more than $10 billion of investment funds were accomplished. The Value Innovation activity was an increasingly eager variant of CCC21. Under this program, more investment funds were accomplished by making the whole improvement process less expensive and by further cutting parts and creation costs.And at long last, the Global 15
Wednesday, July 15, 2020
Understanding Risk Factors for OCD
Understanding Risk Factors for OCD OCD Causes Print Common Risk Factors for OCD By Owen Kelly, PhD Medically reviewed by Medically reviewed by Steven Gans, MD on August 05, 2016 Steven Gans, MD is board-certified in psychiatry and is an active supervisor, teacher, and mentor at Massachusetts General Hospital. Learn about our Medical Review Board Steven Gans, MD Updated on January 19, 2020 Brooke Auchincloss / Getty Images More in OCD Causes Symptoms and Diagnosis Treatment Types Living With OCD Related Conditions There are many risk factors for obsessive-compulsive disorder (OCD). A risk factor is something that increases a personâs chance of eventually developing a given illness. No one knows what causes OCD, but these are the risk factors, below. Remember, just because you might have a higher risk for developing OCD does not mean that you will. Conversely, people can develop OCD without having any or many risk factors. Risk Factors for OCD That You May Be Born With Genetics: About 50 percent of your risk for developing OCD is determined by your genes. As such, having family members with OCD is a risk factor. The closer that these individuals are to your immediate family, the greater your riskâ"particularly if their OCD began in childhood or the teen years. It is important to keep in mind, however, that families can shape behavior in ways other than through genes. For example, you might learn unhealthy coping mechanisms during stressful situations by observing your parents. Gender: Gender as a risk factor for developing OCD varies with age. Males are at greater risk of developing childhood OCD. However, following the onset of puberty, the risk of developing OCD for males and females is about the same. Its worth noting that men and women may exhibit different symptoms. Males are more likely to complain of obsessions that are related to sexuality, exactness, and symmetry, and women are more likely to complain about obsessions and compulsions that are related to contamination and cleaning. Brain Structure: Though the connection is not clear, there seems to be a relationship between OCD symptoms and certain irregularities in the brain. Research is being done to discover more on this topic. Personality: Certain personality characteristics may contribute to a vulnerability for developing OCD. For example, people who score high on measures of neuroticism may be at greater risk. Socioeconomic Status: Lower socioeconomic status is another risk factor for developing OCD. But its unclear whether this is a cause or consequence of OCD symptomsâ"all thats known is that there is an association between the two. Risk Factors That Are Outside Your Control Age: Late adolescence seems to be the time when people are at the greatest risk for developing OCD. Once youre in early adulthood, your risk of developing OCD drops with age. Life Events: Stressful life events, particularly those that are traumatic in nature and occurred early on in life, are major risk factors for developing OCD. For example, having been physically or sexually abused would fall into this category. Mental Illness: Having another form of mental illness, especially another anxiety disorder, is a risk factor. This relationship is complex, however, since, in some people, OCD may be a risk factor for other mental illnesses. Risk Factors That Are Modifiable Drug Use: Drug use can create a vulnerability for developing OCD by causing neurotransmitter changes in the brain. It can also indirectly lead to OCD by creating additional stress through conflict with parents, difficulty maintaining employment, and trouble with the law. Marital Status: Being unmarried seems to be a risk factor. Whether this is a direct cause of OCD or not is unclear, as being unmarried may simply be a result of debilitating OCD symptoms that get in the way of forming relationships. On the other hand, marriage may buffer people against life stress, thus reducing the chances of developing OCD. Employment Status: Another risk factor is being unemployed. However, like being unmarried, being unemployed may be both a cause and a consequence of OCD symptoms. The 9 Best Online Therapy Programs
Saturday, June 27, 2020
Analysing Business, Personal And Professional Development - 275 Words
Analysing Business, Personal And Professional Development (Essay Sample) Content: BUSINESS DEVELOPMENT AND PROFESSIONAL DEVELOPMENT(Name)The Name of the Class (Course)Professor (Tutor)The Name of the School (University)The City and StateThe DateBusiness Development and Professional DevelopmentIntroductionThe values and vision of an organization play a great role in motivating the employees. The term motivation itself is derived from the term motive which is defined as, what prompt an individual to act in a specified manner or develop a given conduct (Bush, 2013). Motivation itself is a significant component in improving the productivity and thus every leader has to have an understanding of the visions and values of the organization so as to promote the yields of the organization through motivation. Bush (2013) defines motivation to any power in an individual that has the power to drive him or her towards the satisfaction of the basic needs.Notably, values that a business organization portrays shape its operational principles that are essential for directing how employees should conduct based on wheres the visiondeclaration outlines what the organization aims to be in future. It clearly defined goals and values, ensure that everyone in the organization is aware of both the long term goals and short term goals as well as their expected code of conduct as employees of the organization (Gale, 2012). This creates a favorable environment in boosting the morale of employees since they know what is expected of them. Both the values and visions of an organization play an important role in the motivation of employees in an organization. In this paper, I intend to discuss the values and missions in relation to the motivation theories, describe various motivation theories as well as relate their application to the realization of the vision of a tourism based organization.The importance of Visions and Values in Motivation of Employees.ValuesEvery organization has its stipulated values which aim at safeguarding the vision of the organizat ion and ensure its achieved. Some of these values are; teamwork, honesty, excellence, commitment, recognition, professionalism, optimistic and creative.Teamwork is one of the values that helps in enhancing the inspiration within the employees since it creates a platform whereby workers listen to one another, check with others and have a divergent view in the performance of various chores within an organization. Personnel, therefore, support each other in an organization, work towards a common goal co-operatively regarding each and everyones views (Bush, 2013). This leads to a favorable operational atmosphere full of fun and satisfaction. The employees, for that reason, will not require much supervision and will be able to deliver on time and meet deadlines (Furman, 2015).An organization operation based on teamwork also has set guidelines of conflict resolutions which are solved in the open to coming up with an impartial result which all parties are comfortable with.According to Mas low's and Herzberg theories, all these theories work at crafting motivation for the employees. Maslow's in his theorem talks of the social needs of the employees. In his theorem, he discusses the need of giving and in receipt of love, attachment, belonging, connotation and acceptance (Gale, 2012). This can only be possible if the organization creates a means of socialization to improve their employee's social needs. By embracing teamwork as a value it ensures interactions and mingling which leads to friendships and association. Secondly, conflicts are resolved amicably and in an open manner, therefore, improving the social aspect of employees.According to Herzberg theorem, it indicates that the fundamental factors within the organization work setting are deficient. Arguably an employee experiencing an intrinsic motivation is always devoted to the job all through as well as self-fulfillment (Bush, 2013). In his theorem, he differs with Maslow's since in his theorem the intrinsic in spiration, the attributes are resulting from the work itself and are experienced by employees individually (Gale, 2012).It is evident from the two theories that values of the organization, in the case, it will determine the motivation of the employees.Professionalism and specialization as a value each employee acts with integrity, he is dependable and accountable and always delivering work of high quality. Secondly, the employees present their disagreement in a manner that portrays good character and courtesy. Tasks are performed in accordance with the set guidelines and codes of conduct and each employee are able to deliver to the maximum in his area of specialization.Maslow in his theorem discusses the aspect of specialization as a self-actualization need whereby there is a need to recognize one's potential for sustained self-development and for continuous development of an individual's capability.VisionThe vision defines the optimal image of the organization in the forthcoming be aring in mind the goals set, for them to be accomplished the organization values play a great role. The vision itself motivates the organization to deliver so as to realize the vision in time to come. (Gale, 2012).The employees are focused on attaining the predicted goals. Working toward a definite goal will always motivate employees since there are benefits accrued when the objectives and goals are realized to them, the entire organization as well other stakeholders of the organization.However, there is a simple vision statement that an organization can have such as; to offer affordable solutions in health care, to be the best beer brewing company in the United States or to be the only choice of preference to every consumer (Bush, 2013). However, there are other missions which are comprehensive in nature. For instance, one of the companies that is committed to the value of relentlessness is Epson Limited Company that pursuits the concept of innovation in its compactness. The compan y achieves this goal by practicing environment viability standards such as energy saving and high-precision technologies.Motivation Theories.Motivation can be defined in simple terms as a theoretical thought used to explain human behavior. These concepts give the reasons as to why people acted in a given way, their needs as well as their desires (Gale, 2012).Extensively these theories also explain why an individual would like to repeat a certain behavior and why he wouldn't want to repeat the behavior. Several theories discuss these motivation theories, basically, am going to give more preference to the theories discussed later.Hertzbergs Two Factor Theory.This theory was established in the early 1950s by a man known as Fredrick Hertzberg. In his study, he found two factors that influence employee's motivation and satisfaction. (Furman, 2015). He, therefore, classified them as motivation factors and hygiene factors. Motivation factors are those that motivate the employee to work har der at the workstation. These are such as enjoying your work, feeling reorganized and career advancement. The second factor is the Hygiene factors. The absence of these factors may lead to the absence of motivation and dissatisfaction. These factors include good salaries, company policies, and relationships with managers and core workers. (Gale, 2012). According to Herzberg, both factors, motivation and hygiene factors work independently of each other. Though the employee satisfaction is increased by motivator factors, their absence does not really mean dissatisfaction also the hygiene factors do not necessarily mean increased motivation and satisfaction but their absence lead to an increase in dissatisfaction.Arguably, Hertzbergs Two Factor Theory implies that for a comparatively developed and productive workforce requires a firm to focus on improving production factors such as hygiene and motivators. This will enable the employees to feel supported and appreciated thus enhancing a means of giving responses and ensure employees and their role in the growth and prosperity of the company (Bush, 2013). Additionally, the theory stresses on ensuring that the employees are treated well and earn a fair salary for the services or work done and that the management is supportive. To effectively employ these theories it's imperative for one to understand that different people have a different thing that motivates them and therefore a need to understand what really motivates employees at an individual level.Maslows Hierarch of needs theory. Maslow's as a psychologist developed the theory based on human motivation. The nitty-gritty of the theory being that each individual greatest basic wants and needs have to be met prior to their motivation. Maslow's theorem is based on a hierarchy of 5 levels. These are and physiological level, safety level, belonging, self-esteem and self-actualization. (Bush, 2013). Physiological needs include food water and shelter which have to be meet for one to survive, safety level include the personal and financial security, the welfare and health. According to the pyramid of needs, one has to be in good health, secure and safe, one also has to have meaningful relationships and confidence. All these factors ensure development and growth of employees.Hawthorne Effect. The Hawthorne effect was initially described by Henry A. Lands Berger in the 1950s. He observed a tendency of some workers to work harder when they knew that they are being observed. According to his theory, employees will work harder if they know they are being seen. (Furman, 2015). However, in his theorem he discourages hovering around b...
Thursday, May 21, 2020
Storing Record Data in a BLOB Field in Delphi
In Delphi, a record data type is a special kind of user-defined data type. A record is a container for a mixture of related variables of diverse types, referred to as fields, collected into one type. In database applications, data is stored in fields of various types: integer, string, bit (boolean), etc. While most data can be represented with simple data types, there are situations when you need to store images, rich documents or custom data types in a database. When this is the case you will use the BLOB (Binary Large Object) data type (memo, ntext, image, etc. - the name of the data type depends on the database you work with). Record as Blob Heres how to store (and retrieve) a record (structure) value into a blob field in a database. TUser record ...Suppose you have defined your custom record type as: TUser packed record à à Name : string[50]; à à CanAsk : boolean; à à NumberOfQuestions : integer; end; Record.SaveAsBlobTo insert a new row (database record) in a database table with a BLOB field named data, use the following code: var à à User : TUser; à à blobF : TBlobField; à à bs : TStream; begin à à User.Name : edName.Text; à à User.NumberOfQuestions : StrToInt(edNOQ.Text) ; à à User.CanAsk : chkCanAsk.Checked; à à myTable.Insert; à à blobF : myTable.FieldByName(data) as TBlobField; à à bs : myTable.CreateBlobStream(blobF, bmWrite) ; à à try à à à à bs.Write(User,SizeOf(User)) ; à à finally à à à à bs.Free; à à end; end; In the code above: myTable is the name of the TDataSet component you are using (TTable, TQuery, ADOTable, TClientDataSet, etc).The name of the blob field is data.The User variable (TUser record) is filled using 2 edit boxes (edName and edNOQ)and a check box (chkCanAsk)The CreateBlobStream method creates a TStream object for writing to the blob field. Record.ReadFromBlobOnce you have saved the record (TUser) data to a blob type field, heres how to transform binary data to a TUser value: var à à User : TUser; à à blobF : TBlobField; à à bs : TStream; begin à à if myTable.FieldByName(data).IsBlob then à à begin à à à à blobF : DataSet.FieldByName(data) as TBlobField; à à à à bs : myTable.CreateBlobStream(blobF, bmRead) ; à à à à try à à à à à à bs.Read(user,sizeof(TUser)) ; à à à à finally à à à à à à bs.Free; à à à à end; à à end; à à edName.Text : User.Name; à à edNOQ.Text : IntToStr(User.NumberOfQuestions) ; à à chkCanAsk.Checked : User.CanAsk; end; Note: the code above should go inside the OnAfterScroll event handler of the myTable dataset. Thats it. Make sure you download the sample Record2Blob code.
Subscribe to:
Posts (Atom)