Guia de Autoaprendizaje_powerbuilder 5

July 6, 2017 | Author: Olpc Perú | Category: Window (Computing), Sql, Databases, Table (Database), Microsoft Windows
Share Embed Donate


Short Description

Download Guia de Autoaprendizaje_powerbuilder 5...

Description

c c c

GUIA DE AUTOAPRENDIZAJE POWER BUILDERc cPRESENTACIONc cCAPITULO 1 : Iniciando PowerBuilder Versión 5.0c c   c cc   c c  c  c   c  c  c c   c c c cc c c c 

c c

 c c c c  c c c !c c " #cc c c   c c c$ c c%& c cCAPITULO 2 : Construyendo una Aplicaciónc  $ c c c ' c c(# c c  c c  c c cCAPITULO 3 : Construyendo Ventanas (Windows)c  $ c )*+c  c*c) +c  $ c c c "c c c)*+c    c c*) +c ' c c c c ,  c c c c   cc c  c  c  c c c c c c" -c c c  c   c c  c .  c c c  c c  c /c c"0c c c  c 1 / c c"c(  c c c  c 1 / c"  c  cc c  c cCAPITULO 4 : Entorno Base de Datosc  c  c c1c  c c  c c1c  c c" c  c  c  c% ' c  c  c% ' c, 2 c  c c( . c c c  c c1)(1 +c 3 c c / c

cCAPITULO 5 : Entorno Menúc  c c !c  $ c c !c  c c c !c . .c  c c c !c .c  cc#c  c% c3   c c c ! c 1 / c  4 c$c 

c c

 c  c c !c c 'c c !c   c3 c c c  c ' c c !c  5c c !c cCAPITULO 6 : Creando Datawindowsc  c(# c1c  c c(# c1c /c c1c -  c . c c  c c  c 1 / c c,  c c1c  c c  cc   c c  5c   c c c1c ' c c c1c cCAPITULO 7 : El Lenguaje Power Scriptc 67 8c c c3 9c ,  c2c  5c cBIBLIOGRAFIAc cc c

c c c c c c c c c

c

c

PRESENTACIONc c  c  c: c c&c c / 2;cc  c  c c3 c : c c / 2c c&;c  c c18c38c! c c c  c< / 2c,2 =>>>+;cc c;c8c4 c  c c  c c  c

c {c    c c   c4c  c c"c(  c  c {c 3  c c"c(  c c !c1 .cc c c

c c4

 c

c Ejemplo:  c c c3. % c c c   cc c 4c c  -cNúmero c c c

;c c c . c  &c  c cc  cCcc c   c/ c cc c  c c c! cDc$c .c  c c! cCc Definiendo Teclas Aceleradoras a los Controlesc 3 c  c / c  c  cc c  c c  c c   c  c c/ c cAlt + Tecla Aceleradora. c c  c  c c.c&,  c c c  c c'cc c c  c  c

c Ejemplo:  c c c c  c -c)c c ?c c c  c+c c  cR  ;c  c c  c  c 2c;c$c c c.cRc 2c   c c c  cc$;c8c c   c  $c c Ejemplo Práctico:c

c c c' c c  c c$ &c c c  c c .c c c ' ;c cc ;cc  c.c) +c cc c c c ' ;cc

 5c. cc c cc2  c c c# c ;c  ;c' c$c c c cc c# c  cc c;c c  c  .  c c c c)' ccN+c

c c c c c c c c c c c c c

c

c c ENTORNO BASES DE DATOS c

 c c 5 cc # c c c c   c c  c  c

c c c;c c   cODBCc$c c c / c  cc ¿Qué es un database profile?.cc c   c c  5 2c c c ) +c c  c   cc c c ccc %c c  c   c - &  ;c  c c c).+cc

c c cc c c c cc 2c #  2 ;c6 8c  c cc4c c  c c 9c c c  /c c cc

c c  c

cc c Para nuestro ejemplo usaremos la base de datos Publi.c c

3 c  c / c' cprofiles»;c c c c 2c c'c3 c  c   cc c c cc c c #  c c c$cc c   c c 8c 0;c&c c4 c c  c c cc  ' c  c   cODBC  c 

cc '8c c c c  c cc c  c cc   cc cc c c  c)' c.c @+c 3c c c cODBCc  c c   ;c8 c  2c c / c c&c  ;c c c c c  c c  c cc c / ;c$c .

c c c c c'cc  c c  ;cc c   c c #   c ccc c c;c

   2c c c c cc'c

c c Ejemplo:c  c cc c   c

c CREANDO LA BASE DE DATOSc  c  c c c c;cc c  c c c #  ;c .  c c .   c=c {c   c cc c) c c c c+cc c c   2c c c c c c c c c cc "8c c  c  c$c/ c c  c  c &c3c c  c  c c  c cc ';c4 c ?c c c c  c c c c !c , c$c  c ccCreate Database.c

c c c  2c c' c  cc c c

c 4;c c c c c   2c c c c c   c cc c c c c$c4 c ?c c c cOk.c

cc

c c

c c c  c c c cc c4 c ?;cc cc 4c c   c$c  cSelect Tablesc  2c c c c cc   c$cc c c cc c'&c  c'c cc c

c PowerBarc

c Barra de Herramientas del pintor Base de Datos )"  +c c c CREANDO LAS TABLASc c' 5c c c4c c c c cc c  c  c c c c  2ccc c c c;c c

c  c c  c c c !cObject new tablecc c c cc  c c c c c

c  c4

 c c c  2c c

c c  c c c c c c )  c c .-+;c .  c  c.  c c ;c c .     c  2c c cc c  &c c ccc

.    ;c cejemplo=c  M  ;c  ;c2 ;c ;c 2cc   c c  c c  c c  cc =c

c Name=c  /c c c cc1  &c c cc c   &c c  ;c c #  c=c M  ;cM  ;cM  ;c c Typec=c"c c/ c c  c  c cc- c /  cc c #  c=c' 4 ;c4 ;c  ;c . ;c  ;c ;c  ;c/ c c Widthc=c:! c c  c2-cc.   c cc Dec =c3 c c cc c 8 ;c  /c c! c c  c c   c cc Nullc=ccc  /c c c   c c  &c . c c c .  c     cc c;c c c c  c c  c  ;cc3&cc:cc   c c c ' c c 4'cc  c.  c ;c c  c c . c c c/ c c  c c4c c c.  c cc c c c  c c .  

c(Ctrl+S)cc c ;c cc c' cc c$c .c   c  c c cc c   c

c ATRIBUTOS EXTENDIDOSc %c  c - c cc cc c.   =c Format Attributec=c3 c c c c c'  5c c c;c c  c c  c c

c Edit attribute =c3 c c c   cc c'c.  c cc

c c

c Valid Attributec=c3 c  c  / c c' c   c c;c$c  c c .c c;c.;c/ 4;c c Justify Attributec=c  c  / c c# /c c c c'c c c c$c cc c5  ;c 4;c  c Height and windth attributesc=c  c  / c c0c$c c4c c 2 c c cc

c c Header attributec=cc c/ c c c  2cc c4 c c $ c cc c c   c Label Atribute =c c   c c  cc4  c   ;c c8 c c c c c .c - ;c c c / c) / +c  c c cc c  c cc Comments =c  c  / c  cc  c c;c c c  c

TIPOS DE DATOSc c ccc cc;c   c/  c=c Char (character String) =cc c ;c  ;cc    c  c c .c -;c.     c c c c c 0c c ccc   c Varchar(Variable length/Character String)=c cc c c c c 0c c ccc.   c c'  ;cc'  c  .ccc'  c ;c c ' #c c  c  cc cc c c' c c  c ;c# c c

c cc   ;c c c/ c c4

c c Numeric (numbers)c=cc c   cc 8 ;c c #  =c 3 ;cc c;c ;c4c;c c Integer and Short integer(Counting numbers)=ccc! c cc  #c c  ;c c4 c . c$c c . c c/ c c c c0c c c'cc   c Float and double (floating point numbers)c=c cc cc  c c c  ;c$c c  c c  c3 c/ c c c0c c    c cc Binary (Binary data )c=c cc cc  c   c;cc  c cc ccc.   ;c$c c)4 ;c' 4 ;c . ;c +c      c c c   c/ c. )3;c. 2/;c +c Date, Time and Timestramp :c  c/ 4;c4 cc/ c   ;c c c/ c c c c .  c c4 c2c/2 c # c c ccc8c c CREANDO INDICESc  c  c c& cc c ;c  .  c c.   c= c  c ?c c cc c c c

c  c4

 cc  c c c  !Object c  New, .cIndex.c cc c c  2c c ' c  cc c c c 4;c c  c c  2c  c c ccc c/  2c c & c c

 c! ;c c c 2c c c c & c c ccIndex Name.c  c ?c cOk $c c& c$c  2c c$c 2c   c c c c c c) c& c c  2c c .c ;c  5 c    +c CREANDO LLAVE PRIMARIAc  c c c c c c  c . c cccc c / c cllave primariac)  $c? $+c c c/ c c c c c  ' c!c c . ;c c. 5 c c ccc c  c  c #  c) cc M  ;cM  c c c c M  +c  c ?cc cc 4c c  c  c c c c ;c c

  c ' c c  c c ;c  c

;c c  c c  c

cc c c %c

' c  c)c  $cS $c +c ' c c '.   c c  . c c cc

c

c c c  2c c' c c c c c  ;c c c . 2c ccPrimary Keyc$c c  / 2c cccc c c   c  5 cc

' c  cc   c c  c #  ;c  5 c cc M  c$c M  ;cc    2c c

' c   ;c c  c c c c

c

' c c

cc

c

CREANDO LLAVE FORANEAc c   c  c c

' c/ 2 c c cc c c c  c  c c c  cc c c) c  c #  c. 2/c c c   c cc c  c& ;c c' 2c c c c cmae_public - c ccodi_respc c  c c ccc  c2c c c ;c c  c   c c

' c  c c c ;c  c c  c c  cc c c

' c/ 2 c c c cresponsable+c %c

' c/ 2 c c c4 c c ?cc cc 4c c  c  c c c c c c/ 2 ;c c  cc c c M  ;c   2c c' c c c.   c =c

c c CREANDO EL ORIGEN DE LA BASE DE DATOS (ODBC)c c$c4 c c c(1 c c c . c c c cc  c  c c   c(1 ;c .  c c.   c=c öc öc

 c ?c c cc c c  c c ;c  c c. c

=c

c 3c c'cc  c c  c' 5c c(1 ;c  c c ?c c ccCreate.c

c c  2c

c.   c

=c

cc c c c c

;c

 c c =c: c c( . c c ;c1  ;c   ;c  ;c c c;c  c  ;c$c4 c ?c cOK.c

c

c SELECCIONANDO EL PROFILEc c$c c4c c c c  / c c c   c c c c cc

c c cc 3c c4c c cc  c c    ;c8 c  2c c / c c&c  ;c c c cc   c c  c   c cc c / ;c c   c$c  c c c c  c  c c c c'cc  c c  ;cc c  c c #   c ccc c c ;c    2c c c c cc 'c

cccc

c

c c c c c c c c c c c c c c c

c c

c c

EL ENTORNO MENUc c c c !c c c 0 2c c ! c c  2c c c /  c' c c c c %c  c  c c cc= c SDI = Single Document Interface.c %c cc c c' c$c c c !ccc c cc #  c=c ?c c;c* c MDI = Multi Document Interface.c %c cc c c' c  cc c 1 c$c c ' c   c c 2c c  c$c cc  c   c c c & c'  c c c' c c# =c    ;c  /c* ;c c  c   c c  c !c c'c c

c c4

 c c  c  c )  +c c  cc c c.   c =c

c Pero.... ¿Porqué se usan menúes en las ventanas?c

c c CONSTRUYENDO UN MENUc Hay dos maneras de construir un menúc {c   c c !c  c c c {c   c c !c c4 c c  ;c/  ;c   ;c '  c$c c c c !c$c -  c CONSTRUYENDO UN NUEVO MENUc  c  c c 'c !c .  c c .   c=c @c  c c ?c c cc c c  c !c)c cTc !c c+c c c   c c c c' c c  c c !c c c ! c c c  &c  c;c c$c   c ! c3c 8c c 2c  c  2c c' c '&c

cc

Dc .c ?c c cc: 'c c   c c 'c !c3 c   2c .c c c c #c  c !c c

c

c c

ACERCA DEL PINTOR MENUc "  c' c2 c c #c=c {c c2 c c  / c c  c c !c c

c {c c2 c c / c c  c c c ! c . c {c c2 c c  / cc c c c  c c  c c c 

c c4

 c c  c 1 c

c TRABAJANDO EN EL PINTOR MENUc c c !c ;c c  /c c.   =c {c %c  c c c  c c c !c c

) c

c c c   c   c c c' c+c {c %c  c c c  2c #c ccc c !c  c

c {c   c c c  c {c   c$c#) c c  +c {c 3 c c c ' c c c  c c !c c AGREGANDO ELEMENTOS EN EL MENUc c !c c c c c c  c c c !c c

c$c  c c c !c . c 3 c  c. . c  cc c  !c c c . =c ^ccc c !c

c ^ccc c !c . c ^ccc c !c c c

cc

Para agregar elementos en el menú de barra, seguir los siguientes pasos:c

c

A@c  c ?c c c c c cc c 4c c! c  c  /c c c !c c

c c c c c c #c c !c  c   c  2c cc'&c ADc 1. c c -c c c  2c c c  c Ac  c. . c c  c c !c c

;c4 c c ?cc c  4c c  c cc c / ;c   c  2c  cc'&c ABc 1. c c -c c c 'c  c ANc  c cc@c$cDc c. . c  c c c !c  c

c

c c Para agregar elementos al menú colgante, seguir los siguientes pasos:c AEc  c c ?c c c  c c  c c c / 2c c !c  . c c c !c c

c   c  2c c !c  . c$c /)c - +c c c  c c A>c   c c  c" cc'$c c  cc'&c #c c  5cK  c/ Kc Cc 1. c c -c c c  2c c c  c CAc  c ccCc$c@c c. . c  c c c !c  . c

c Para agregar elementos al menú en cascadac CCc  c ?c c c  c c c !c . c c  c c c   c. c c !c cc

c C@c  c ?c c cc c.   c' c c c

c c4

 c )

+cc  c c c !cc cc: -c)3.   c:' +c c

cc'&c  c #c c  5cK  c, K$c c   c c ' c cc c c c c c  c  5 cc   c c !c cc

cc c

c

Nota:c  c  5cK  c, Kc  c c c c  c c  !c c

;c c . c4c c 4;c c c c c c c c .c$c c . c4c c 4cc c  c   c c 2c. c  cc c !c c c CDc .  c  c c c !c cc c cc c c

c4 c c ! c . c Cc  c.  c c' c 'c c !;c4.c ?c c cc c ' c 'cc  c:' c 'c c ccc COMO SE NOMBRAN LOS MENUESc  c c. .c  c c !;c   c cc c c c  / ;c c  c c c c cMenu Item Name.c

c c NOMBRE POR DEFECTO DEL MENUc

 c c c / c c c c c -c  /c c c '  c /#c c ccOptionsc c !cDesign )   c c /#c  c / c  m_ $c c& c$c  c'2 c c   c c c -c c.c c c  c c !c

c

c 3cc4$c& cc  c cc '2 c c c -c.c c  / c c c c /#c;c c c   c c! c2c#c  c  c ccc c  /#c c  c c c!c c

INSERTAR ELEMENTOS EN EL MENUc CBc 3  c c  c c !c c

c c c  c c 8c   8;c c  cc  c CNc  c ?c c cc   c c c  ;cc  c c   cInscc8c  cInsertarc c ! Editarccc '&c c  2c CEc "  c c -c c 'c  c

c

c

c

c MOVIENDO ELEMENTOS DEL MENUc  c c c  c c c  c c c !c c

cc c c !c  . cc c c !c;c c  c

  c c  cc c c  c c c !cc c) c #  ;cc  c

  c c  c c c !c c

cc c !c . +c Para mover un elemento, seguir los siguientes pasos :c C>c  c ?c c cc ' c) +c c c  cc   cMoverc c !cEditar cc  c c cc c c ' c @c   c$c  c c cc5  c c  c  c c  c c  c' c c  c 2cc c   c c/ c cc

@Ac 

  c c  cc c 'cc c c !c @Cc 3  c cc c   c c  c c  c c c 'c c$c cc cc ' c

c c

c

BORRANDO ELEMENTOS DE LOS MENUSc @@c 3  c c  c c  c

 c @Dc  c ?c c cc 

 c) +c c c  cc  c c c 

 c c !c c c  c c 2c

c

c

c

c

c ASIGNANDO ACELERADORES O ATAJOS c "c c  c c c !c  &c  c c c  c  ;c

c  c  2c c   c  c cc c  cALT + tecla c %c  c c  cc c  $c c c -c c  c #  =c) +c    c c  c / c#;c c  cc  c c/ cc  c c  c c c   c  c  c c  c c  c c c !c c    c c Para asignar un acelerador, seguir los siguientes pasos:c {c 1. c c c)R+c c c c  c c -c c  c c  !c c  c . cc  c {c %c  c c' cc  c  $c c c !c   c c #  c

cc

c c

Para asignar atajo,seguir los siguientes pasosc Ac3  c c  c c !c c c c c  c. c c#c Cc3  c c  c c c c c  c c c. c c #)34  +c @c3c  c  c%";c"%c$Gc3 ,"c c  c cc c   c

c c

c

   c  c c#c c cc c c  c -c c  c c !c%c#c c cc  cc c 4c c -c c c  c   c c #  c

CREANDO LINEAS SEPARADORAS EN LOS MENUESc  c   c. c c  cc & c c c !;c .  c c .   c=c Hc"  c c. c c . c c c -c c cc c  &c c c  c c c  c

c DEFINIENDO MICROHELP Y BARRA DE HERRAMIENTASc cc   c c c  c c c !cc c c  'c 1 )  c  c  / +c  c / c cTexto de MicroHelp;c. c c # c c c2 c 0 cc

c

c GRABANDO UN MENUc 3 c  c.   c c !c c c c c 2c #c c    c  c 3c c  c.  c c !;c .  c c.   c=c @Nc 3  cSave  c ! Filecc cc c/ c c?  ) c+c  c  c c c

c c 4

 c3c c !c/ c .  c '  ;c c   c. c c 'c' c c cc  &c$c . c c  !c c3c c !cc/ c .  c '  c    c  c c' c cc  c.   c !c @Ec 1 c c c c !c c c c c ! c @>c   c .!c  c c    c c !c Dc  / c c  &c c c c c 'cc.   c c !c DAc  c ?c c(?;c c.   c c  !c

c

VISTA PREVIA DEL MENUc cc  c   c c 2c c c !;c   c c4 c'c 'c c c 2c  0c  c

c  c cc)

c

c c4

 cc   cPreview c  c ! Design.c

+c c

cc cc c ;c c !c c  2c c c' cc c  c c c /. c   c c ESCRIBIENDO SCRIPT PARA LOS ELEMENTOSc  c  c c  c c !;c  c

 c cc) # =c  c c' ;c  5 c c  ;c  c +;c c c c  /c

  c.c c c c  c   c3 c c c  ;c .  c c.   c=c DCc 3  c c  c D@c  c ?c c cc3 c)  c c  2c

+c c c  c c 3 c

c EVENTOS DEL MENUc  c' c c ' c c !;c4 c ?c c cc c  c c4#c c c c) +;c cc  c  cc cc!c ' c  c c c !c

c cc Evento

Descripciónc

clickedc c c2c  c &c c   c c.c c  c  c #   c c c   c . c c c c c #  c  c c' c selectedc ' cc c  5cc/  c3 c #  c  c cc c 0 cc c cc c

. cc #    c c

UTILIZANDO UN MENUc

3 c  c  5 c c ! c cc =c {c  c c c !c c

c c c' c {c  c c !cc c !c c AGREGANDO UN MENU A UNA VENTANAc  c  c c !c c

c c  c c c' ;c c cc c  !cc c' c c cc c Para asociar un menú con una ventana, seguir los siguientes pasos :c DBc   c c cc)  c ' +c$c  c c ' cc c c c  c  c c !c DNc  c c ?c c c/c c

c' cc   cwindow Style c  !cdiseño,  c   cc c    c c c.c DEc 3  c cc !c 4 c ?c c ccBrowsec$c . c c !c c c ;c c   c  cc c ! c c c c c) c c # =c c  c cM  +c

c

c c c c c c c c c c

c c c c c c c c c c c c c c

c c

c c CREAN DO DATA WINDO WSc

cc c c# c'  c c cc cc 2  ;c  c c.  c c   c'  c c c  c3 c  cc c

cccccccccc

c

EL OBJETO DATAWINDOWS c  c(# c1*c c c# c c c c c    ;c   c$c   cc c c c cc  c c c/  c cc)c  4'c1 ,+c  ;c 2;c . cc  c c  c )/ / ;c 4;U+c %c# c1*c  c c c cc cc   c   c  / c/ c c $c$c c  ;c c/ c c c cc c c c c2c./'c

c  c  c cc c c' c c  c  cc  =c {c 1c(# c)c' c/.c  c+c {c 1c  c)ccc  c  c  cc c c# c c c'  5 c c c c c' +c {c .c c -c c c cc c c c c c c$c c   5c c c' c c c c c  2c cc c CREANDO UN OBJETO DATAWINDOWc  c  c c# c;c .  c c.   c=c {c {c {c {c

 c c ?c c c c1*c) +c c ;c cc3 c1c c $ 2c  c ?c c cc: c %c'  New DataWindowc c $ 2c

c

c c {c . c c  c c  =c, / ;c  ;c. ;c  c c ) c c #  c c . 2c cc 1+c {c Opcional ] . c c c c(# c1*c {c . c c1c3  c c c(# c1*c) c c #  c  c . 2c c/  c cc7 ?c3 +c {c  c ?c c ccOkc {c 3  c )+c )+c$cc c )+c)+c c c   2c c cc

c {c 3c c  c c  c4 c c 'c   c  8c c c (# c1c*c4cc /c c

c4 c ?c c cc)+c  c c

c c4

 c c cc {c Opcional ]  c  c #  c c  c c& c$c c c {c    c c(# c1*c)c4 c ?c c cc c c c

c  c4

 c+cc c  2c c.   c' =c

cc c c'   c c c c# c .c c c c c c c  c c

c

{c   c c cc c c c'cc.   c c# c;c  . c c c' cM;c  c c  &c c c c c'cc .  c$c4 c ?c c ccokc MODIFICANDO UN DATAWINDOW EXISTENTE c

{c  c ?c c c1* c )c +c {c 3  c c# cc  c c  c  &c {c  c ?c c(Sc {c c c' c c  2cc  c/ c c c c cc cc c ESCOGIENDO EL ESTILO DE PRESENTACIONc  c  c c  c c c c c c# cc  c c/ c c   c c c c  c $c c(# c1*c c cDataWindow painter Workspace.c 3 c  c . c c.   c  c c  c c c 'c(# c 1*c=c {c {c {c {c {c {c {c {c

Tabular Freeform Grid Label N-up Group Graph Crosstabc

ccccccccccc

c

ESTILO TABULAR c  c  c c  c  c ccc '8c c ;c  5)4  +c$c2.;c.     c  c 4c/ c c c 1;c cc cc c c(# c1c  c/ c c  .5c / ;c' c c c$c -c c  c c /     c c c c  c.  c cc

ESTILO FREEFORMc  c  c c  c  c ccc c c;c c 

c4c#c c c2.;cc c  'c  c cc c   c .5 c c /c / c' c c c$c -c c  c c/     c c c  c c)  +c

ESTILO GRIDc  c  c c  ;c  c cc c/ c/ H cc

 c. c c  c/ c$c c:c  c' c c c$c  5cc c c  c  c c

ESTILO LABELc  c  c  c ccc  c#c  c  c c  c  c c

c c cc c  c

ESTILO N-UPc  c  c  cCcc2c/ c c cc & c c(# c1*;c c  . c c cc  c c  c  c

ESTILO GROUP c  c  c c c/ c c c  c. c c c(# c1*;c .  c c  c  c c 2c. c c c  c cc  /c c c c . c

ESTILO GRAPH Y CROSSTAB c %c  c  ccc c -c   c ' cc  c c   c  c/ c. 2/  c=c. 4c$c c

c c DEFINIENDO LA FUENTE DE DATOS c  c / c c/  c cc)3  +;c c  /c 2 c c c/  c c c c 2c c c c(# c1c3 c  c . c c c .   c/  c c=c

{c Quick Select {c SQL Select {c Query External {c Stored Procedurec

cccccccc c

3c cc c c(# c1*c  ;c '  c c c c c;c . c7 ?c3 ;c37%3 ;c7 $c;cc3 c   cc c1c 3  c 3c ccc    cc c c c c$c c  c . c ;c   c c c$c3 c):c  c.  ;cc  ;c +;c . c7 ?c3 c37%3 c 3c cc4cc /c$c 'c c c $;c . c7 $c 3c cc c /c c c3 c   c)   c  +;c . c3 c   c 3c ccc '  c c c 1c;c . c3 c - c c $ c c.   c  =c 3c cc 2c c c c 4'c - ;c cc c 4'c c -c   c c ccc 4'cF )1 ,+c 3c cc 2c c c c c11c

QUICK SELECTc 3c c  c  c c c c c ;c  c7 ?c3 cc   ;c c7 ?c3 c.  c c  c37%c c SQL SELECTc  c c37%c3 cc1c3  ;c c $ c c  c37%c c ). /cc -+c c  c  c c.   =c 2c c c c {c {c {c {c

  c c c)   c*4 +c   c c3 )   c(  c $+c   c c.  c)   c.  c $c$c'.+c  c c

CREANDO UN CONTROL DATAWINDOWSc

c  c;ccc  ;c'c .c c c ' c  c  c c  cc$c

cc c# c ;c .  c c.   c=c {c   c c 'c' c)+c {c 3  c c c

c c4

 c c  c c)' c c c  c c c5  +c {c  . c c  c c c' ;c2 c c0c c  c  c'cc  c cc c c  c   c

cc

c

c c {c  c c  cc c# cc    c  c  c

;c c c ?c c c  cc$c  2c c ' c c   c c c c c  2c c c2 cDataWindow Object Name,c c c c c# c {c c'   c c c c c c  c c cc  c c cc# c {c c c c c c' ;c c c  c c   c c  c c c c ' c ;c   c c.   c.=c M c  # ) +c M    ' )c+c

c

c

c c {c 3c c cc  c.c c(:F (:cc c c;c   c c.   c.c c c ' c c c c c

c CONTROLANDO LA ACTUALIZACIONc  c   c c  5c c c;c .  c c.   c=c {c  c c ?cc cc 4c c  c c c  cc   2c c cc c c c c c c/. c {c 3  c c=cModify DataWindow....c {c c c  2c c  c c)c ? +c {c 3  c c !c;c cc  c   c cc cc c

{c c c  2c c' c   cc c.   ;c c c c c4 2c c 4 ?c c4 ?-cAllow Updates.c

c {c  c ?c cOKc$c c c   2c c   c c   5c

cc

c COMPONENTES DE UN DATAWINDOWSc ccc    c c c.   c2 =c

c c cc c;c8c - c2 c=c Group Headerc=c  c/ c c c c. c c c  c Group Trailerc=c  c c c cc. c c Barra de color =c3 c  c c c  c c?.  ;c -;c ;c  c c  c c !c c EVENTOS DE UN DATAWINDO WSc %c ' c2c  c c# cc=c Evento Clickedc

Se ejecuta cuando ...cccccccccccccccccccccccccccccccc

 c   c #  c c ?cc c c Constructorc  c ' c 2c   c ccc c# c c c3 c #  c c c cc c  c c# c DbErrorc c

c c

 c c c cc c c  c

 c  c c c cc$c 

c .!c  c  c Destructorc  c c  $ c c# ;c    c c

 c c ' c EditChangedc c' 5c c c   c c c  c$c/c c 2 c  c c c cc Errorc 3 c   c c

 c c' c c cc ItemChangedc  c   c4c/c cc c c c cc c c  ccc c  c c c'  c c;c$c c cc c  c c 45 c c c c   c4c   c ItemErrorc  c   c4c  c c 4. c c cc c   c cccc c . c c' c  c c cc# c ItemFocusChangedc  c   cc cc RetrieveEndc c/ 5c c c   ' c) cc c c c +c c RetrieveRowc   c c 2c #  c c c   ' c$c

  cc c c c/ c RetrieveStartc

 c c c c  c c c37%c3 c c c c  cc RowFocusChangedc  c/cc c/ c cc c c  c c #  c c&c c c4 c c ;c c  cc c

  ' c SqlPreviewc c' 5c c #  c/  c c c c/ cc c  c cc Retrieve,c  ;c c $c! c c   c c c c c 2c.  c UpdateEndc c/ 5c c  5c c c c cc UpdateStartc  c c c   c c  5c c c c cc  c/ 5 c1*;c .c  =c:    ;c  c  .c cc  c c c' ;c$c  8c c.c c c c# c c  c4 c c c c8c c cc  c4 c8c2  cc '8c c c c c  c 1(# c) cc .+c c c c.c cc# cc c c c c c c c c c  c c8c /  c c

c

c c c c c c c

c c

c c EL LENGUAJ E POWERSC RIPTc

   c  c c  c c #c

c 3 ;c c  c ' c c   c c.c c c ccc

 c c . # c c  . c

c 3 c  c . # c 3 c c $c - c$c c c   cc c  c    c c c  5 c . c2cc c #c c 4'c c $ cc 2c .5c c c c 5# ;c  c2c  c c c  2c c 4c  c c& c ' 2c c c 8c/ c c4c c  5 ;c$c  8c c  c c c 4'c c$  c ¿QUE ES EL SCRIPT?c  c c c c# c c cc2cc c . # c 3 c c c #  c c  cc c #  c c ' c c c';c c  ;c  c 2c cc c  c ' c c c c c4 c / cc' ;c  ;c# ;c ! ;c'  c$cc  c  ;c c  c  c c/ c # =c

c FACILIDADES DEL PINTOR POWERSCRIPTc {c  c4

 c c c c c cc$c ! c c   c ;c  ;c . ;c

 ;c  c$c  c  c c c

{c  c -c c  c c'  ;c# c$c;c c  ;c c  c ;cc .c c cc c c c c   c c   c

c cc PRONOMBRES USADOS POR EL POWER SCRIPTc %c  c c c c 3 c=c

/ c c# c  c Thiscc

/ c c# c c c4 c c  c Supercc

/ c c# c c  c c  c cccc Parentcc

/ cc c' c c  c c !c) c' c c ParentWindowcc  ! + c TIPOS DE DATOSc  3 c ' c@cc cc=c ESTANDAR :c 3  cc 4c . # c c . ;c c 3 c  5c cc cc c   c'  cc

$;c&c  c c.   c #  =c Tipo

Descripciónc

Blobcccccccccc c   c2.  c -c.  c Booleanccc" cc,  c Charccccccccc3 c 2 c MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMc Datecccccccccc, 4c MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMc Datetimecccc%c/ 4c$c c4 c c c cc cc Decimalcccc:! c  cc.c cAEc&.c Doublecccccc c/  c Intccccccccccccc cc.c cDc$ c Longcccccccccc c  .c cBc$ c c OBJETOS DEL SISTEMAc c   c c c# cc;c ! ;c  c    c c c / c cc c# cc cc cc

Ejemplo :c  c / c c'  c=cccccccccmi_windowc  c / c c'  c !=cccccccccc  mi_menuc 1 / c c'  c = CommandbuttoncMc ENUMERADOS=c   c c c cc/ c=c c .  c c/  c$c c  / c c  c c c# cc  c cc cc   c  c c.cc c# c/#c c'  c c'  c  c c c - c)O+c #  c=c  cc cc . ;c  c c.cc c c c c.   c '  c=c  O;c /Oc$c .4Oc

TIPOS DE VARIABLESc  3 c  cDcc c'  =c Variables Globales =c c c  c c c    c  c c c c Variables de instancias(Instance)=c c   c  c'  c cc  c c2c c c c  c c c# ;c cc  c c.  c c c c c Variables compartidas(Shared)=c%c'  c cccc c  /c c# ;c c  ;cc cc c  c# c  cc c'  c !c Variables locales=c c c   c c'  c   ;c8cc /c c c c$c c  c   c c4c c c

OPERADORESc    c c c.   cc c  =c

c

FUNCIONES MAS UTILIZADAS c cc FUNCIONES PARA VENTANAS: c   c c' c openc   c c' c  c c c' c ccc opensheetc   c c' c '2 c c 2  c openWithParmc

ccccc

openSheetWithParmc closec

  c c' c  c c c ccc '2 c  2  c 

 c c' c  ) *+c$c  c) +c c'2 c c

BUFFERS DEL DATAWINDOWS c Primary!c c c // c c / c c c c   c/cc c  c Original!c c c // c c.  c cc c$cc c    c c c c cc Deleted!c   c c/ c

c

Filtered!c  c c c/  cc c;c &c c  c c/ c cc c' ;c $c c4c  c c // c  $Oc Ejemplo del uso de buffers:c  c c   c

c c/ ;c8cc   c c c  ;cc c    c c ' c c // c  $c c1  c&c cc ;c c

  

cc  cc c c cc FUNCION ES DEL DATAWIN DOWc

AcceptTextc  'c c' c cc  cc c   cc cc DBCancelc  'c c c c c   ' )c+c c c DeletedCountc 1 ' ' c c! c c/ c c c   c4c

c DeleteRowc 

c c/ c Describec 1 ' ' c/ c $c 

c c c   c c c 1*c Filterc #  c c/  c  c)'8 c ,  +c GetChildc 1 ' ' c c  cc c1*c c  c c c GetColumnc 1 ' ' c c! c c c  c c GetColumnNamec 1 ' ' c c c c c c  c GetItemxxxc ---c   c cc cc1 ' ' c c'  c c c c c GetItemStatusc 1 ' ' c c c c c/ cc c

cGetRowc

1 ' ' c c! c c/ c  c

cc ccc ,ccc c :c c c (c :c c 3c cc

GetSQLSelectc 1 ' ' c c c c cc GetTextc 1 ' ' c c .c c  c c'  c c c c c 2c c c c c c c   c c/  cc cc GetValuec 1 ' ' c c .c  c c'  c c c c InserRowc  c c/ c c c

cc

Modifyc /c c   c c c cc

1c c

Printc   c cc

cc cc 1c c "c c *c c :c 1c (c *c 3c ccc c

Retrievec #  c c c c c c cc$c  c cc c c c RowCountc  c c/ c c cc SaveAsc 3 'c c c c cc c c/4 c3 c' c/ c  $ c - ;c -;c /c$c4 c ScrollToRowc 3 

c cc4c c/ c$c c4 c' c)c/  cc  )++c SetColumnc c c/cc c c c c SetFilterc /c c c c/  c c c1*c SetFocusc  c c/c c cc c

SetItemc /c c'  c c c c SetItemStatusc /c c c c c/ cc c SetRowc  c c c/ c  /c c c  c SetSortc

/c c c c   c SetTransObjectc  5c ccc c# c c c c cc/  c c  c #   c c.   c =c NombreDw.SetTransObject(SQLCA)c ShareDatac  c c cc ccc c) c  c .  c c / c c  #+c Sortc (  c c1cc c c  /cc3 3 )+c Updatec  c c/ c c c c cc Ejemplos:c

c

c $c 4c2c/  c c8cc c c  c  c c . c2cc  c c c/ c c c cc

c c c c c c

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF