FoxPro/Visual FoxPro - AYUDA VFP 6.0 NO COINCIDEN LOS TIPOS DE DATOS

 
Vista:
Imágen de perfil de FREDDY

AYUDA VFP 6.0 NO COINCIDEN LOS TIPOS DE DATOS

Publicado por FREDDY (10 intervenciones) el 14/07/2015 00:24:02
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
set talk off
set status off
clear
do while .t.
define window a from 0,0 to 60,100 title "grupo"
ACTIVATE WINDOW A
@5,20 say "DATOS PERSONALES" font "ARIAL",30
@15,40 prompt "INGRESO"
@20,40 PROMPT "CONSULTA"
@25,40 PROMPT " SALIR"
MENU TO OP
DO CASE
CASE OP=1
DO INGRESO
exit
CASE OP=2
DO CONSULTA
CASE OP=3
EXIT
ENDCASE
ENDDO
DEACTIVATE WINDOW A


PROCEDURE INGRESO

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
SET TALK OFF
SET STATUS OFF
CLEAR
OP="s"
USE="MEN"
GO TOP
DO WHILE OP="s"
mtelefono = space (10)
MAPELLIDOS = SPACE   (25)
MNOMBRES= SPACE  (25)
MECIVIL=SPACE       (25)
MpaisproceD = SPACE (20)
MNACIONALID=SPACE   (25)
MPROFESION=SPACE    (25)
MDIRECCION=SPACE    (25)
MOCUPACION=SPACE    (25)
DEFINE WINDOW B FROM 0,0 TO 60,100 TITLE "GRUPO" 4
@5,23 SAY "DATOS PERSONALES" FONT "ARIAL",30
@15,10 SAY "APELLIDOS" GET MAPELLIDOS
@15,50 SAY "NOMBRES" GET MNOMBRES
@20,10 SAY  "TELEFONO" GET mtelefono
@20,50 SAY "ESTADO CIVIL" GET MECIVIL
@25,10 SAY "PAIS PROCEDENCIA" GET Mpaisproced
@25,50 SAY "NACIONALIDAD" GET MNACIONALID
@30,10 SAY "PROFESION" GET MPROFESION
@30,50 SAY "DIRECCION" GET MDIRECCION
@35,10 SAY "OCUPACION" GET MOCUPACION
READ
APPEND BLANK
replaceTELEFONO with mTELEFONO   aqui es donde muestra el mensaje "no coinciden los tipos de datos"
REPLACE APELLIDOS WITH MAPELLIDOS
REPLACE NOMBRES WITH MNOMBRES
REPLACE ECIVIL WITH mECIVIL
REPLACE paisproced WITH Mpaisproced
REPLACE NACIONALID WITH mNACIONALID
REPLACE PROFESION WITH MPROFESION
REPLACE DIRECCION WITH MDIRECCION
REPLACE OCUPACION WITH MOCUPACION
@42,10 SAY "DESEA CONTINUAR S/N" GET OP
READ
IF OP ="s"
LOOP
    ELSE
EXIT
ENDIF
ENDDO
   DEACTIVATE WINDOW B
   PROCEDURE CONSULTA
SET TALK OFF
SET STATUS OFF
CLEAR
USE ="MEN"
GO TOP
OP="s"
DO WHILE OP="s"
DEFINE WINDOW C FROM 0,0 TO  60,100 TITLE "GRUPO"
MAPELLIDOS =SPACE (25)
@10,20 SAY "CONSULTA DE DATOS" FONT "ARIAL",25
@20,20 SAY "INGRESE APELLIDO" GET APELLIDOS
READ
LOCATE FOR APELLIDOS = MAPELLIDOS
IF APELLIDOS = MAPELLIDOS
@25,10 SAY "APELLIDOS" + APELLIDOS
@25,50 SAY "NOMBRES" + NOMBRES
@30,10 SAY "TELEFONO" + telefono
@30,50 SAY "ECIVIL" + ECIVIL
@35,10 SAY "PAIS PROCEDE" + paisproced
@35,50 SAY "NACIONALIDAd" + NACIONALID
@40,10 SAY "PROFESION" + PROFESION
@40,50 SAY "DIRECCION" + DIRECCION
@45,10 SAY "OCUPACION" + OCUPACION
ELSE
WAIT WINDOW "APELLIDO NO EXISTE" TIME 3
ENDIF
@45,50 SAY "DESEA CONTINUAR S/N" get op
read
IF OP="s"
     LOOP
         ELSE
             EXIT
                 ENDIF
                      ENDDO
                      DEACTIVATE WINDOW C

me an dicho que difina la variable telefono como string pero no se como se la define y tampoco se si es el mtelefono que q definirla
o estoy mal
ayuda
GRACIAS
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de FREDDY

AYUDA CFP 6.0 NO COINCIDEN LOS TIPOS DE DATOS

Publicado por FREDDY (10 intervenciones) el 15/07/2015 00:31:40
ES EN VFP 6.0
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

AYUDA VFP 6.0 NO COINCIDEN LOS TIPOS DE DATOS

Publicado por Luiz Alexandre (58 intervenciones) el 17/07/2015 05:00:52
O campo "TELEFONO" da sua tabela deve estar como numérico mude para texto.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de freddy

AYUDA VFP 6.0 NO COINCIDEN LOS TIPOS DE DATOS

Publicado por freddy (10 intervenciones) el 24/07/2015 23:29:00
gracias lo pude solucionar

ya lo solucione pero ahora tengo que presentar un informe e imprimirlo
haora me encuentro en esa traba

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
set talk off
set status off
clear
do while .t.
define window a from 0,0 to 80,250 title "grupo"
activate window a
@5,55 say "DATOS PERSONALES" font "arial",30
@15,75 prompt "INGRESO"
@20,75 prompt "CONSULTA"
@25,75 prompt "modificacion"
@30,75 prompt "eliminacion"
@35,75 prompt "reporte"
@40,75 prompt "SALIR"
menu to op
do case
case op=1
do ingreso
case op=2
do consulta
case op=3
do modificacion
case op=4
do eliminacion
case op=5
do reporte
case op=6
exit
endcase
enddo
deactivate window a
procedure ingreso
set talk off
set status off
clear
use="men"
op="s"
do while op="s"
mtelefono = 0
mapellidos = space  (25)
mnombres= space     (25)
mecivil=space       (25)
mpaisproced = space (20)
mnacionalid=space   (25)
mprofesion=space    (25)
mdireccion=space    (25)
mocupacion=space    (25)
mcomentario=space   (90)
define window b from 0,0 to 80,250 title "grupo"
activate window b
@5,55 say "DATOS PERSONALES" font "arial",30
@15,25 say "APELLIDOS" font "arial", 15 get mapellidos font " arial", 15
@15,100 say "NOMBRES" font " arial" ,15get mnombres font "arial", 15
@20,25 say "TELEFONO" font " arial" , 15get mtelefono font "arial" ,15
@20,100 say "ESTADO CIVIL " font" arial" ,15  get mecivil font "arial" ,15
@25,25 say "PAIS PROCEDENCIA"font "arial" ,15 get mpaisproced font"arial",15
@25,100 say "NACIONALIDAD" font "arial", 15 get mnacionalid font " arial",15
@30,25 say "PROFESION" font"arial", 15 get mprofesion font" arial", 15
@30,100 say "DIRECCION" font"arial", 15 get mdireccion font "arial",15
@35,25say "OCUPACION"font "arial",15 get mocupacion font" arial",15
@40,25 say "COMENTARIO"font " arial" ,15 get mcomentario font " arial", 15
read
append blank
replace telefono  with mtelefono
replace apellidos with mapellidos
replace nombres with mnombres
replace ecivil with mecivil
replace paisproced with mpaisproced
replace nacionalid with mnacionalid
replace profesion with mprofesion
replace direccion with mdireccion
replace ocupacion with mocupacion
REPLACE COMENTARIO WITH MCOMENTARIO
@45,25 say "DESEA CONTINUAR S/N" font " arial" ,15 get op
read
if op ="s"
loop
else
exit
endif
enddo
deactivate window b
procedure consulta
set talk off
set status off
clear
use ="men"
op="s"
do while op="s"
define window c from 0,0 to  80,250 title "grupo"
activate window c
mapellidos =space (25)
@5,55 say "CONSULTA DE DATOS" font "arial",25
@12,55 say "INGRESE APELLIDO" font "arial", 15 get MAPELLIDOS font "arial" , 15
read
locate for apellidos = mapellidos
if apellidos = MAPELLIDOS
@20,25 say "APELLIDOS "  + apellidos font " arial",15
@20,100 say "NOMBRES "  + nombres font" arial" , 15
@25,25 say "TELEFONO "  + str (telefono) font " arial" ,15
@25,100 say "EST.CIVIL "  + ecivil font " arial" ,15
@30,25 say "pais procede " + paisproced font "arial" ,15
@30,100 say "NACIONALIDAD "  + nacionalid font "arial" ,15
@35,25 say "PROFESION "  + profesion font " arial",15
@35,100 say "DIRECCION "  + direccion font " arial" ,15
@40,25 say "OCUPACION "  + ocupacion font " arial",15
@45,25 say "COMENTARIO " + COMENTARIO  font "arial" ,15
else
wait window "APELLIDO NO EXISTE " TIME 3
endif
@40,100 say "DESEAS CONTINUAR S/N" font " arial" ,15 get op
read
if op="s"
     loop
         else
             exit
                 endif
                      enddo
                      deactivate window c
procedure modificacion
set talk off
set status off
clear
use ="men"
go top
op="s"
do while op="s"
define window d from 0,0 to  80,250 title "grupo"
activate window d
mapellidos =space (25 )
@5,55 say "MODIFICACION DE DATOS" font "arial",25
@12,55 say "INGRESE APELLIDO" font "arial",15 get MAPELLIDOS font"arial",15
read
locate for apellidos = mapellidos
if apellidos = MAPELLIDOS
@20,25 say "APELLIDOS" get apellidos font "arial",15
@20,100 say "NOMBRES" get nombres font "arial",15
@25,25 say "TELEFONO" get  telefono font"arial",15
@25,100 say "EST.CIVIL" font "arial" ,15 get ecivil font"arial",15
@30,25 say "pais procede" font " arial",15 get paisproced font"arial",15
@30,100 say "NACIONALIDAD"font " arial",15 get nacionalid font"arial",15
@35,25 say "PROFESION" font" arial" ,15  get profesion font"arial",15
@35,100 say "DIRECCION" font" arial",15 get direccion font"arial",15
@40,25 say "OCUPACION " font"arial",15 get ocupacion font"arial",15
@45,25 say "COMENTARIO" font"arial",15 get comentario font"arial",15
else
wait window "APELLIDO NO EXISTE " TIME 3
endif
@45,100 say "DESEAS CONTINUAR S/N" font "arial",15 get op
read
if op="s"
     loop
         else
             exit
                 endif
                      enddo
deactivate window d
 
procedure eliminacion
set talk off
set status off
clear
use ="men"
go top
op="s"
do while op="s"
define window e from 0,0 to  80,250 title "grupo"
activate window e
mapellidos =space (25)
@5,55 say "eliminacion DE DATOS" font "arial",25
@12,55 say "INGRESE APELLIDO" font "arial",15 get MAPELLIDOS font"arial",15
read
locate for apellidos = mapellidos
IF apellidos = MAPELLIDOS
@20,25 say "APELLIDOS"  + apellidos
@20,100 say "NOMBRES"  + nombres
@25,25 say "TELEFONO"  + str (telefono)
@25,100 say "EST.CIVIL"  + ecivil
@30,25 say "pais procede"  + paisproced
@30,100 say "NACIONALIDAD" + nacionalid
@35,25 say "PROFESION"   + profesion
@35,100 say "DIRECCION"  + direccion
@40,25 say "OCUPACION "  + ocupacion
@45,25 say "COMENTARIO"  + comentario
@45,100 say "desea eliminar s\n" font "arial",15 get op
READ
if op="s"
DELETE FOR APELLIDOS = mapellidos
PACK
else
wait window "LOS DATOS NO SERAN ELIMINADOS " time 1
endif
ELSE
wait window "APELLIDO NO EXISTE " TIME 1
endif
clear
@45,100 say "desea continuar" get op
read
if op="s"
loop
else
exit
endif
clear
@50,100 say " desea continuar s\n" get op
read
if op= "s"
     loop
         else
             exit
             endif
                     enddo
 
 
deactivate window c











lo de aqui es reporte
ayuda hay
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
procedure reporte
set talk off
set status  off
clear
use ="men"
op="s"
do while op="s"
define window f from 0,0 to  80,250 title "grupo"
activate window f
mapellidos =space (25)
@5,55 say "reporte" font "arial",25
@12,55 say "INGRESE APELLIDO" font "arial", 15 get MAPELLIDOS font "arial" , 15
read
locate for apellidos = mapellidos
if apellidos = MAPELLIDOS
@20,25 say "APELLIDOS " + apellidos font " arial",15
@20,100 say "NOMBRES " + nombres font" arial" , 15
@25,25 say "TELEFONO " + str (telefono) font " arial" ,15
@25,100 say "EST.CIVIL " + ecivil font " arial" ,15
@30,25 say "pais procede " + paisproced font "arial" ,15
@30,100 say "NACIONALIDAD " + nacionalid font "arial" ,15
@35,25 say "PROFESION " + profesion font " arial",15
@35,100 say "DIRECCION " + direccion font " arial" ,15
@40,25 say "OCUPACION " + ocupacion font " arial",15
@45,25 say "COMENTARIO " + COMENTARIO  font "arial" ,15
@45,100 say "desea imprimir s\n" font "arial",15 get op
READ
if op="s"
SET PRINTER ON [PROMPT]
set printer to  default
set device to screen
set printer off
else
wait window "no se imprimira " time 1
endif
ELSE
wait window "APELLIDO NO EXISTE " TIME 1
endif
clear
@45,100 say "desea continuar s/n " get op
read
if op="s"
loop
else
exit
endif
clear
@50,100 say " desea continuar s\n" get op
read
if op= "s"
     loop
         else
             exit
             endif
                     enddo
                     deactivate window f
ayuda por favor
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar