Create a logon instance Using PowerBuilder-I understand it (1 ).

Source: Internet
Author: User

Create a logon instance Using PowerBuilder-I understand it (1 ).
1. Editor's message

I wrote this blog because I didn't even use a complete small example when I was a beginner Using PowerBuilder. I found a variety of materials online, but it is not a version with my own pb, some of which cannot be found, and there is no complete process, some are database building, some are application building, the Code is also displayed, but I don't know what the complete process is. That is depressing.

After a few days of hard work, I finally combined various materials to complete the simple "login" example from creating a database, creating an application, and then implementing the specific code, here, I would like to share with you that you can learn the basic usage of pb through the following logon instances.

This series of blogs has a total of two articles. This article introduces the creation of databases and tables and data writing during the preliminary design. PowerBuilder creates logon instances.-You finally understand (2 ), we will introduce the subsequent Project Creation and code completion.

Ps: The following example is based on the introduction of PowerBuilder9.0. To use this example, download powerbuilder 9.0 with serial numbers for free.

Ii. Preliminary Design of Logon examples

1. Create a database and Table 1.1 create a database (1) Open pb and the main interface appears. Click the DATABASE canvas button on the toolbar to Create a new Database, and double-click Create ASA DATABASE

(2. "UserID" indicates the user Name for the Database. The default value is DBA, and "Password" indicates the Password. The default value is SQL. "Database Name" indicates the storage path and Database Name. After entering the information, click OK.


1.2 create a database table

(1) Select the Tables in the created database Testdatabase, right-click it, and select New Table.


(2) After obtaining the data, create a user table required for login, including the username and password, and then select the corresponding data type, set it to char (20)


Right-click to add a new column.


The result is as follows:


(3) press Ctrl + S, or click Save. The table name User_Info is displayed.


(4) then set the primary key (you must set the primary key; otherwise, you cannot add data to the table ). For example, select the created table and right-click New \ Primary Key.


Select name as the primary key, and then save


1.3 add Data to the database table (1) Select the new table and right-click Edit Data \ Grid


(2) Right-click the blank area and select Insert Row.


(2) enter a piece of data. The user name and password are both 1,


Summary: At this point, the preliminary design and completion have only introduced some basic functions. I do not explain other features such as creating views in pb. I hope they will be involved in future studies.


Related reading: PowerBuilder full instance

Powerbuilder initial test-uncover that layer of gauze



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.