html5-img
1 / 17

PowerBuilder

PowerBuilder. School of Computer System Engineer UVAQ jcolivares@uvaq.edu.mx 19.72388 lat, -101.1848 long. M.C. Juan Carlos Olivares Rojas. Disclaimer.

Jims
Download Presentation

PowerBuilder

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PowerBuilder School of Computer System Engineer UVAQ jcolivares@uvaq.edu.mx 19.72388 lat, -101.1848 long M.C. Juan Carlos Olivares Rojas

  2. 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.

  3. Outline • Introduction • PowerScript • PowerDesigner • Conclusions

  4. Objectives of theSession • The students will know a 4GL paradigm language: PowerBuilder. This is another programming language paradigm.

  5. Imtroduction • PowerBuilder 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 J2EE Platforms.

  6. PowerScript Components Tab Page Tab WorkSpace Tab Language Tab ApplicationPainter (IDE)

  7. PowerScript PowerScriptTargets Web Targets Types of Projects

  8. Practice 1 • Developing Simple Applications • HelloWorld • sum two numbers (validate numbers, clean the form, exit) • Ecuations/Triangle • Developing a Simple Database Applications • Database about Location Services

  9. Practice 1 // Comments integer n1 n1=integer(sle_nro1.text) if n1>0 then sle_nro2.setfocus() else sle_nro1.text="" sle_nro1.setfocus() end if

  10. Practice 1 • The databases (tables) can be created through a Table Painter or creating a connection using a ODBC Painter. Int Emp_num 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

  11. SQL Statements • COMMIT {USING TransactionObject} ; • CONNECT {USING TransactionObject} ; • DELETE FROM TableName WHERE Criteria {USING TransactionObject} ; • DISCONNECT {USING TransactionObject} ; • INSERT RestOfInsertStatement {USING TransactionObject} ; • ROLLBACK {USING TransactionObject} ; • SELECT RestOfSelectStatement {USING TransactionObject} ;

  12. SQL Statements • UPDATE TableName RestOfUpdateStatement {USING TransactionObject} ; If dw_profesor.Update()= -1 Then Rollback; MessageBox("Error",“Don’t save!",Exclamation!) Else Commit; MessageBox("Information", “Save correctly!!") End if

  13. Other Statements CHOOSE CASE Expression CASE option1 Instruction Block CASE optionn2 Instruction Block CASE optionn Instruction Block CASE ELSE Instruction Block END CHOSE

  14. Other Statements • DO WHILE conditionn • Instrucctions • LOOP • DO UNTIL condition • Instrucctions. • LOOP

  15. Other Statements DO Instrucctions. LOOP WHILE condición DO Instrucctions. LOOP UNTIL condition FOR var=Initial TO final STEP (Increment) Instruction Block NEXT

  16. 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.

  17. ¿Preguntas?

More Related