ImageVerifierCode 换一换
格式:DOCX , 页数:49 ,大小:1.22MB ,
资源ID:3635813      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/3635813.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(PB8 程序设计培训讲义.docx)为本站会员(b****4)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

PB8 程序设计培训讲义.docx

1、PB8 程序设计培训讲义PB8 程序设计培训课程注意:本培训讲义中所用的特殊符号含义如下。要点 实例 配置步骤& 选学内容 第一章 PB8集成开发环境介绍一、 PB8与现行开发工具对比 开发效率(MIS) 多层构架 界面制作 适用范围PB 很高 很高 一般 数据库VB 一般 一般 较好 一般DELPHI 一般 一般 最好 最广二、 PB8开发工具的发展历程PB6 每次只能开发一个应用,不能同时修改代码与界面PB7 每次只能开发一个应用,可以同时修改代码与界面PB8 每次可以开发多个应用,可以同时修改代码与界面三、 PB8的特点1. 初学有障碍,入门后进境迅速2. 界面较单一,需用心制作界面3.

2、 完全的面向对象4. 基于事件驱动的程序设计5. 开放的数据库系统6. 多平台的支持7. 支持团队开发,集成的源代码控制系统8. 支持多层应用程序组件的部署9. 简洁的模块复用技术四、 PB8新增的功能1. 功能强大的系统树2. 灵巧的输出窗口3. 深得人心的剪贴窗口4. 方便的WEB开发,集成了PowerSite站点开发工具5. 优雅的源代码编辑器6. 整合的组件服务器7. 新的数据库驱动接口8. 新增的系统函数9. 新增的错误捕获技术五、 PB8的IDE环境1. 新增new的使用2. 继承inherit的使用3. 打开open的使用4. 预览preview的使用5. 系统树system t

3、ree的使用6. 输入窗口output的使用7. 错误消息切换error message的使用8. 任务列表to-do list的使用9. 浏览窗口browse的应用10. 剪贴窗口clip window的使用11. 库画板画板library的使用12. 数据库配置文件db profile的使用13. 服务器配置文件easerver profile的使用14. 数据库画板database的使用15. 多功能编辑器edit的使用16. 部署应用程序deploy的使用17. 调试debug的使用18. 运行run的使用六、 PB8做MIS系统的流程1. 不得不做的需求分析(用户手册)2. 系统设计

4、方法(概要设计、详细设计、操作手册)3. 数据库设计方法4. 程序设计方法及注意事项5. 软件测试及试运行6. 后期维护与二次开发七、 PB8开发应用程序的步骤1. 创建一个工作区(*.pbw) NEWWORKSPACE2. 创建一个目标文件(*.pbt),规划库列表(*.pbl),设置全局属性3. 创建数据库配置文件(*.ini)4. 设置事务属性、连接数据库、测试连接是否成功5. 创建主菜单、为菜单指定工具条图标6. 创建主窗口(TYPE:mdihelp),关联主菜单到主窗口(主窗口不充许放置控件)7. 创建工作窗口(TYPE:main),在主菜单中打开8. 布置控件到工作窗口、9. 生成

5、数据窗口对象,将它与工作窗口的数据窗口控件关联10. 为工作窗口的事件编写代码(OPEN)11. 为工作窗口的控件编写代码八、 PB8创建菜单的方法1 创建子菜单(submenu)2 添加菜单3 插入菜单4 编辑菜单5 复制生成菜单6 删除菜单九、 PB8创建工具栏的方法1 为对应菜单指定工具条图标2 为对应菜单指定工具条提示3 为对应菜单指定工具条次序4 为对应菜单指定工具条索引十、PB8应用对象、菜单对象详解1 应用对象属性、事件、函数及附加属性 AppName String ClassDefinition PowerObject DDETimeOut Integer DisplayNam

6、e String DWMessageTitle String FreeDBLibraries Boolean MicroHelpDefault String RightToLeft Boolean ToolbarFrameTitle String ToolbarPopMenuText String ToolbarSheetTitle String ToolbarText Boolean ToolbarTips Boolean ToolbarUserControl Boolean Close When the user closes the application.ConnectionBegin

7、 Obsolete (used for distributed PowerBuilder connections)ConnectionEnd Obsolete (used for distributed PowerBuilder connections)Idle 由空闲函数触发Open When the user runs the application.SystemError When a serious execution time error occurs ClassName String Returns the class of the Application object.GetCo

8、ntextService Integer PostEvent Boolean SetLibraryList Integer Sets the PBD library list in an executable.SetTransPool Integer TriggerEvent Integer TypeOf Object (if typeof(this)=application! Then end if)2 菜单对象属性、事件、函数Checked Boolean ClassDefinition PowerObject Default Boolean (是否加黑)Enabled Boolean I

9、tem Menu Specifies the Menu objects under a Menu object.MenuItemType MenuItemTypeMergeOption MenuMergeMicroHelp String Specifies the text of the MicroHelp for the object.ParentWindow Window Specifies the window that owns the Menu object.ShiftToRight Boolean (在继承菜单中指定菜单项的位置)Shortcut Integer Tag Strin

10、g Specifies the tag value assigned to the Menu object.Text String Specifies the text in the Menu object.ToolbarItemDown Boolean .ToolbarItemDownName String ToolbarItemBarIndex Integer ToolbarItemName String ToolbarItemOrder Integer Specifies the order of the item in the toolbar.ToolbarItemSpace Inte

11、ger ToolbarItemText String ToolbarItemVisible Boolean Clicked When the Menu object is clicked (selected or unselected).Help When the user presses the F1 key or drags the context help button Selected When the user moves to the Menu object using the arrow keys or the mouse.Check Integer ClassName Stri

12、ng Returns the class of the Menu object.Disable Integer Enable Integer GetContextService Integer GetParent PowerObject (getparent().classname()如果是菜单,返回上级菜单)Hide Integer Makes the Menu object invisible.PopMenu Integer Displays the Menu object at the specified location.PostEvent Integer Show Integer M

13、akes the Menu object visible.TriggerEvent Integer TypeOf Object Returns the type of the control.Uncheck Integer 3一个PB应用实例 第二章 PB8的数据库管理功能一、 如何使用ODBC连接数据库创建数据源、创建ODBC配置文件(ACCESS、SQL、ORACLE) DB PROFILE二、如何使用专用接口连接数据库创建专用接口的配置文件(SQL、ORACLE)三、如何使用OLE DB接口连接数据库 创建OLE DB接口的配置文件(SQL、ORACLE)四、事务对象与事务控制语句(SQ

14、LCA)1、 事务对象的属性、事件、函数2、 常用的事务控制语句五、常用的SQL语句1、 DML语句SELECT 、INSERT 、DELETE 、UPDATE2、 DCL 语句GRANT、REVOKE3、 DDL语句CREATE DATABASE、CREATE TABLE、CREATE VIEW、CREATE DEFAULTCREATE RULE、CREATE INDEXALTER DATABASE、ALTER TABLE、ALTER VIEW、ALTERDEFAULTALTER RULE 、ALTER INDEXDROP DATABASE、DROP TABLE、DROP VIEW、DROP

15、 DEFAULTDROP RULE、DROP INDEX4、 高级SQL选项GROUP BY、ORDER BY、DISTINCT、UNION5、 常用SQL聚合函数SUM()、MAX()、MIN()、COUNT()、AVG()6、 常用SQL函数GETDATE()、CONVERT()、CAST()六、使用数据库画板创建数据库对象、数据管道的使用1、 创建、修改与删除表、视图2、 创建角色、登录帐号、用户3、 创建主键、外键、索引及其作用4、 创建与使用数据管道导入数据5、 数据库画板中不得不注意的事项(恢复原来布局)七、创建存储过程、函数、触发器与游标 CREATE PROCEDURE、CRE

16、ATE FUNCTIONCREATE TRIGGER、DECLARE CURSORALTER PROCEDURE、ALTER FUNCTION、ALTER TRIGGERDROP PROCEDURE、DROP FUNCTION、DROP TRIGGER八、配置文件的生成与用法1、 生成配置文件2、 使用配置文件3、 使用注册表项九、 接对象的创建与用法创建与使用连接对象(声明实例对象)十、动态SQL的四种语法格式(help:Dynamic)1、 没有输入与输出参数的SQL2、 有输入参数没有输出参数的SQL3、 有输入参数输出参数的SQL4、 未知的返回结果集类型的SQL5、 PB自带的系统表

17、用法6、 上机练习作业:按下图所示、制作出“商品类别录入”窗口与“商品单位录入”窗口 第三章 PB8语言及其系统函数一、 Power Script语言的数据类型Blob(图像) Integer or Int 216(2*8)Boolean Long 232(4*8)Char or character(单个字符) Real Date String DateTime Time Decimal or Dec UnsignedInteger, UnsignedInt, or UInt decimal 3 ld_priceDouble UnsignedLong or ULong二、 Power Scri

18、pt语言的运算符1、 算术运算符+、-、*、/、(3=8)2、 关系运算符=、=、=、3、 连接运算符+ a+b=ab4、 续行运算符 & 两行或多行做为一行来执行5、 逻辑运算符 AND、OR、NOT6、 特殊运算符 适用于SQL语句IS、LIKE、NOT LIKE、BEWTEENAND、IN、NOT IN三、 Power Script语言的注释1、 行注释 / int li_msg = 12、 块注释 /* int li_msg = 1 */3、 注释的作用四、 常量、变量、数组的定义与使用1、 常量的定义与使用(CONSTANT int MIN = 1000)常量不允许修改2、 变量的定

19、义与使用 数据类型 变量名 int li_max3、 数组的定义与使用 数据类型 数组名n,m int li_demo int li_demo12 to 104、 标识符的声明规范(变量与对象)五、 Power Script语言的系统函数1. 数组函数LowerBound The lower bound of dimension n of a specified array.UpperBound The upper bound of dimension n of a specified array.2. BLOB函数Blob Convert or copy data to a blob dat

20、a typeBlobEdit Copy data into a variable starting at a given positionBlobMid Obtain characters in blob data starting at character n. Len Obtain the length of a blobString Convert a blob to a string3. 数据类型转换函数Asc Obtain the ASCII value of a character.Char Obtain a blob, integer, or string as a char.D

21、ec 把一个(数字)字符串转换为一个DEC类型的数dec(123.45)=123.45Double Obtain the contents of a string as a double. Integer Obtain the contents of a string as an integer.Long Obtain the contents of a string as a long.Real Obtain the contents of a string as a real.Date Obtain the date portion of a DateTime value DateTime

22、 Obtain a date and a time as a DateTime value.IsDate Determine whether the specified string contains a valid dateIsNull Determine whether the argument is NULL.IsNumber Determine whether the specified string contains a number.IsTime Determine whether the specified string contains a valid time.String

23、Obtain a date to a string formatted in a specified formatTime Obtain the time portion of a DateTime value 4. 日期时间函数Day The day (an integer between 1 and 31)DayName The name of the day of the weekDayNumber for example, Sunday is 1 and Wednesday is 4DaysAfter The number of days one date occurs after a

24、notherHour The time from which you want to obtain the hourMinute The time from which you want to obtain the minutesMonth The month (an integer between 1 and 12)Now 系统时间 RelativeDate The date that occurs n days after a given dateRelativeTime The time that occurs n seconds after a given time.Second Th

25、e number of seconds in the seconds portion of a given time.SecondsAfter The number of seconds one time occurs after another.Today 系统日期Year The year (an integer between 1000 and 3000)5. 目录文件函数FileClose (3) Close a fileFileCopy Copy a fileFileDelete Delete a fileFileExists Determine whether a file exi

26、stsFileLength Obtain the length of a fileFileMove Move a fileFileOpen (1) Open a fileFileRead (2) Read a fileFileSeek Seek to a position in a fileFileWrite (2) Write to a file.ChangeDirectory Change directoryCreateDirectory Create a directoryDirectoryExists Determine if a named directory existsGetCu

27、rrentDirectory Get the name of the current directoryGetFileOpenName Display Open File dialog.GetFileSaveName Display Save File dialog.RemoveDirectory Remove a directory6. 数值函数Abs Obtain the absolute value of a number.ASin Obtain the arcsine of an angle. The angle is in radians.ACos Obtain the arccos

28、ine of an angle. The angle is in radians.ATan Obtain the arctangent of an angle. The angle is in radians.Ceiling 返回大于给定值的最小整数 ceiling(3.2) = 4Cos Obtain the cosine of an angle. The angle is in radians.Exp Obtain e raised to the power of x.Fact Obtain the factorial of x.Int 返回小于给定值的最大整数 int(3.2) = 3L

29、og Obtain the natural logarithm (base e) of a number.LogTen Obtain the decimal logarithm (base 10) of a number.Max Obtain the larger of two numbers.Min Obtain the smaller of two numbers.Mod Obtain the modulus of two numbers (for example :mod(1,2)=1)余数Pi Obtain pi (3.14159265358979323) times a number

30、.Rand Obtain a random whole number (between 1 and a specified number). Rand(10)Randomize Initialize the random number generator.Round Obtain a number rounded to a number of decimal places.Sign Obtain a number (-1, 0, or 1) indicating the sign of a number.Sin Obtain the sine of an angle. The angle is in radians.Sqrt Obtain the square root of a number.Tan Obtain the tangent of an angle. The angle is

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1