Power Builder M C Juan Carlos Olivares Rojas
Power. Builder M. C. Juan Carlos Olivares Rojas School of Computer System Engineer UVAQ jcolivares@uvaq. edu. mx 19. 72388 lat, -101. 1848 long
Disclaimer Some material in this presentation has been obtained from various sources, each of which has intellectual property, so in this presentation will only have some rights reserved. These slides are free, so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on my part. In return for use, I only ask the following: if you use these slides (e. g. , in a class) in substantially unaltered form, that you mention their source.
Outline • Introduction • Power. Script • Power. Designer • Conclusions
Objectives of the Session • The students will know a 4 GL paradigm language: Power. Builder. This is another programming language paradigm.
Imtroduction • Power. Builder is development by Sybase. • It’s a powerfull database-oriented language (SQL Anywhere). • Actually implements service-oriented and object -oriented language. • It’s multiplatform. It has support to. NET and J 2 EE Platforms.
Power. Script Components Tab Work. Space Tab Page Tab Language Tab Application Painter (IDE)
Power. Script Targets Web Targets Types of Projects
Practice 1 • Developing Simple Applications – Hello. World – sum two numbers (validate numbers, clean the form, exit) – Ecuations/Triangle • Developing a Simple Database Applications – Database about Location Services
Practice 1 // Comments integer n 1=integer(sle_nro 1. text) if n 1>0 then sle_nro 2. setfocus() else sle_nro 1. text="" sle_nro 1. setfocus() end if
Practice 1 • The databases (tables) can be created through a Table Painter or creating a connection using a ODBC Painter. Int Emp_num=Integer(sle_Number. Text ) UPDATE Employee SET emp_name = : sle_Name. Text WHERE Employee. emp_num = : Emp_num USING Emp_tran ; IF Emptran. SQLNRows > 0 THEN COMMIT USING Emp_tran ; END IF
SQL Statements • COMMIT {USING Transaction. Object} ; • CONNECT {USING Transaction. Object} ; • DELETE FROM Table. Name WHERE Criteria {USING Transaction. Object} ; • DISCONNECT {USING Transaction. Object} ; • INSERT Rest. Of. Insert. Statement {USING Transaction. Object} ; • ROLLBACK {USING Transaction. Object} ; • SELECT Rest. Of. Select. Statement {USING Transaction. Object} ;
SQL Statements • UPDATE Table. Name Rest. Of. Update. Statement {USING Transaction. Object} ; If dw_profesor. Update()= -1 Then Rollback; Message. Box("Error", “Don’t save!", Exclamation!) Else Commit; Message. Box("Information", “Save correctly!!") End if
Other Statements CHOOSE CASE Expression CASE option 1 Instruction Block CASE optionn 2 Instruction Block CASE optionn Instruction Block CASE ELSE Instruction Block END CHOSE
Other Statements • DO WHILE conditionn • Instrucctions • LOOP • DO UNTIL condition • Instrucctions. • LOOP
Other Statements DO Instrucctions. LOOP WHILE condición DO Instrucctions. LOOP UNTIL condition FOR var=Initial TO final STEP (Increment) Instruction Block NEXT
References • Robison, D. and Pagna, J. , (2008) , Wap 2. 0 Mobile Web: XHTML Mobile Profile. • Kantor, P. (2006), XHTML, Desert Code 2006. • Skelton, G. , Excell, P. , Robison, D. and Taj, I. (2008) XHTML Basic and XHTML-MP. • Ingram, M. (2008) Mobile Devices: Driving Standards for a “New” Web.
¿Preguntas?
- Slides: 17