PowerBuilder Summary--it turns out you're so simple.

Source: Internet
Author: User

I. Personal summary

The final stage of the self-study exam is to let us use PB to do a small program. Of course, there is a simple understanding of PB before, but it's really hard to do something with it. After a few weeks of fighting, finally finished the graduation design. Let's be excited to review this period of study, a good summing up

1, the experience of graduation design This graduation project gave us an opportunity to learn independently. How we turn new knowledge into old knowledge requires that we contact the knowledge we have before, compare them, find out the similarities and differences, and then master the different places.
Although PowerBuilder is a new language, but after this study, in the use of gradually skilled use, from unfamiliar to familiar, to it has a new understanding.

The beginning of the graduation thesis, or confused, when determined their own topic, know what to do after, began to design their own functional modules, their own database tables, and then consult a variety of PB books, on-line to find the relevant information, after all kinds of difficulties, and finally finished it, A lot has been learned in this process.

    2. Experience of graduation design      Learning is a process of never knowing, knowing, or understanding. Therefore, in this process, we do not need to worry, brave stride forward.life should be treated with a positive attitude, whether we like it or not, since the choice to do, it is necessary to do a good job, since it is necessary to learn this knowledge. Therefore, we have to study in the spirit of a learning mentality. First of all, to the basic operation of PB have a certain understanding, and then to learn grammar knowledge, consult related books and materials, so that PB become handy.

In short, learning is not only finished, after learning the first task is to summarize, summary is the harvest, we do not only know hard work, do not understand the natural harvest. Only we seriously summed up, the harvest, knowledge can become our own, the new will become old, so that learning can achieve a multiplier effect, and will not lose knowledge. finally say, the book Mountain has no royal road for the path, the work of the Dragon is a boat. Let us live to be old, learn to be old.

second, simple operationfirst to share with you the harvest of this study, let us see through this study, in the end learned what.
Learning a language, the first thing to understand is the knowledge of grammar, the following we say that PB in the basic increase, delete, change, check (in fact, more SQL statements basically the same).
1. Add Users A system, the first thing to do is to add data. Here the use of the IsNull function, this function is written by itself, and then to describe how to write, its role is to determine whether the content of the control on the form is empty, to ensure that the information is complete, no omission.

Define variable int Addlevelstr_user user  

2. Modify user Information

The colon appears here because the PB syntax requires that the variables in the SQL statement be prefixed with a colon

Define variable int addlevelstr_user user  <span style= "font-family:arial, Helvetica, Sans-serif;" >//defines a structure, that is, what we normally call entity </span>//to determine whether it is an empty if isnull (parent) Thenmessagebox ("hint", "incomplete information!") ") Returnend if//Convert the permissions to the stored information if trim (ddlb_level.text) =" Admin "thenaddlevel=0elseif trim (ddlb_level.text) =" General user " Thenaddlevel=1;elsemessagebox ("Prompt", "Please select User permission level!") ") End if//assigns a variable value User.yhm=trim (sle_name.text) User.mm=trim (sle_pwd.text) User.qx=addleveluser.zsxm=trim (sle_ Truename.text)//Save modified Information update User_info  set Userpwd=:user.mm,userlevel=:user.qx,truename=:user.zsxmwhere USERNAME=:USER.YHM;  MessageBox ("Hint", "modified successfully!")

3. Delete User information

The UserID used here is a global variable, and if the user is logged in, he cannot delete the user (that is, the user cannot delete himself).

Str_user user       <span style= "font-family:arial, Helvetica, Sans-serif;" >//defines a structure that is what we normally call entity </span>user.yhm=trim (Sle_name.text)  //To determine if the current user if User.yhm=userid Thenmessagebox ("Warning", "the user is in use, cannot be deleted!") ") else//Delete the selected user delete from   user_info  where" UserName "=:USER.YHM;  MessageBox ("Hint", "delete succeeded")  Close (parent)   //close form End If

Summary: think at the beginning, just learn VB, that is I learned about the computer's first language, at that time learned about half a year. And now, for me, PB is a new language, but only for half a month, this learning process. Because every knowledge is associated, the more knowledge you learn, the faster you will learn when you learn a new knowledge again . Therefore, we must accumulate own knowledge, the reading, lets own study to be full of vitality.


PowerBuilder Summary--it turns out you're so simple.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.