FoxPro/Visual FoxPro - Error en edicion con UPDATE

   
Vista:

Error en edicion con UPDATE

Publicado por Edgar Arevalo edgorlanes@gmail.com (1 intervención) el 23/03/2017 20:25:25
Tengo un formulario de ingreso de datos, cuando es nuevo no hay problema graba, pero cuendo edito no graba el error es SQL: hay demasiado en campos en UPDATE.

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
215
216
217
218
219
SET NULL OFF
If MessageBox("Grabar Registro...",4+32+256,"Confirma")=6
   xnom=Thisform.text2.Value
   xdir=Thisform.text3.Value
   xhoj=Thisform.text4.Value
   xfna=Thisform.text5.Value
   xtel=Thisform.text6.Value
   xfe1=Thisform.txtfecha1.Value
   xpe1=Thisform.txtpeso1.Value
   xta1=Thisform.txttalla1.Value
   xte1=Thisform.txttempera1.Value
   xpr1=Thisform.txtpresion1.Value
   xdi1=Thisform.txtdiag1.Value
   xtr1=Thisform.txttrata1.Value
   xfe2=Thisform.txtfecha2.Value
   xpe2=Thisform.txtpeso2.Value
   xta2=Thisform.txttalla2.Value
   xte2=Thisform.txttempera2.Value
   xpr2=Thisform.txtpresion2.Value
   xdi2=Thisform.txtdiag2.Value
   xtr2=Thisform.txttrata2.Value
   xfe3=Thisform.txtfecha3.Value
   xpe3=Thisform.txtpeso3.Value
   xta3=Thisform.txttalla3.Value
   xte3=Thisform.txttempera3.Value
   xpr3=Thisform.txtpresion3.Value
   xdi3=Thisform.txtdiag3.Value
   xtr3=Thisform.txttrata3.Value
   xfe4=Thisform.txtfecha4.Value
   xpe4=Thisform.txtpeso4.Value
   xta4=Thisform.txttalla4.Value
   xte4=Thisform.txttempera4.Value
   xpr4=Thisform.txtpresion4.Value
   xdi4=Thisform.txtdiag4.Value
   xtr4=Thisform.txttrata4.Value
   xfe5=Thisform.txtfecha5.Value
   xpe5=Thisform.txtpeso5.Value
   xta5=Thisform.txttalla5.Value
   xte5=Thisform.txttempera5.Value
   xpr5=Thisform.txtpresion5.Value
   xdi5=Thisform.txtdiag5.Value
   xtr5=Thisform.txttrata5.Value
   xfe6=Thisform.txtfecha6.Value
   xpe6=Thisform.txtpeso6.Value
   xta6=Thisform.txttalla6.Value
   xte6=Thisform.txttempera6.Value
   xpr6=Thisform.txtpresion6.Value
   xdi6=Thisform.txtdiag6.Value
   xtr6=Thisform.txttrata6.Value
   xfe7=Thisform.txtfecha7.Value
   xpe7=Thisform.txtpeso7.Value
   xta7=Thisform.txttalla7.Value
   xte7=Thisform.txttempera7.Value
   xpr7=Thisform.txtpresion7.Value
   xdi7=Thisform.txtdiag7.Value
   xtr7=Thisform.txttrata7.Value
   xfe8=Thisform.txtfecha8.Value
   xpe8=Thisform.txtpeso8.Value
   xta8=Thisform.txttalla8.Value
   xte8=Thisform.txttempera8.Value
   xpr8=Thisform.txtpresion8.Value
   xdi8=Thisform.txtdiag8.Value
   xtr8=Thisform.txttrata8.Value
   xfe9=Thisform.txtfecha9.Value
   xpe9=Thisform.txtpeso9.Value
   xta9=Thisform.txttalla9.Value
   xte9=Thisform.txttempera9.Value
   xpr9=Thisform.txtpresion9.Value
   xdi9=Thisform.txtdiag9.Value
   xtr9=Thisform.txttrata9.Value
   xfe0=Thisform.txtfecha10.Value
   xpe0=Thisform.txtpeso10.Value
   xta0=Thisform.txttalla10.Value
   xte0=Thisform.txttempera10.Value
   xpr0=Thisform.txtpresion10.Value
   xdi0=Thisform.txtdiag10.Value
   xtr0=Thisform.txttrata10.Value
   xpfe1=Thisform.txtpfecha1.Value
   xppe1=Thisform.txtppeso1.Value
   xpta1=Thisform.txtptalla1.Value
   xpte1=Thisform.txtptempera1.Value
   xppr1=Thisform.txtppresion1.Value
   xpdi1=Thisform.txtpdiag1.Value
   xptr1=Thisform.txtptrata1.Value
   xpfe2=Thisform.txtpfecha2.Value
   xppe2=Thisform.txtppeso2.Value
   xpta2=Thisform.txtptalla2.Value
   xpte2=Thisform.txtptempera2.Value
   xppr2=Thisform.txtppresion2.Value
   xpdi2=Thisform.txtpdiag2.Value
   xptr2=Thisform.txtptrata2.Value
   xpfe3=Thisform.txtpfecha3.Value
   xppe3=Thisform.txtppeso3.Value
   xpta3=Thisform.txtptalla3.Value
   xpte3=Thisform.txtptempera3.Value
   xppr3=Thisform.txtppresion3.Value
   xpdi3=Thisform.txtpdiag3.Value
   xptr3=Thisform.txtptrata3.Value
   xpfe4=Thisform.txtpfecha4.Value
   xppe4=Thisform.txtppeso4.Value
   xpta4=Thisform.txtptalla4.Value
   xpte4=Thisform.txtptempera4.Value
   xppr4=Thisform.txtppresion4.Value
   xpdi4=Thisform.txtpdiag4.Value
   xptr4=Thisform.txtptrata4.Value
   xpfe5=Thisform.txtpfecha5.Value
   xppe5=Thisform.txtppeso5.Value
   xpta5=Thisform.txtptalla5.Value
   xpte5=Thisform.txtptempera5.Value
   xppr5=Thisform.txtppresion5.Value
   xpdi5=Thisform.txtpdiag5.Value
   xptr5=Thisform.txtptrata5.Value
   xpfe6=Thisform.txtpfecha6.Value
   xppe6=Thisform.txtppeso6.Value
   xpta6=Thisform.txtptalla6.Value
   xpte6=Thisform.txtptempera6.Value
   xppr6=Thisform.txtppresion6.Value
   xpdi6=Thisform.txtpdiag6.Value
   xptr6=Thisform.txtptrata6.Value
   xpfe7=Thisform.txtpfecha7.Value
   xppe7=Thisform.txtppeso7.Value
   xpta7=Thisform.txtptalla7.Value
   xpte7=Thisform.txtptempera7.Value
   xppr7=Thisform.txtppresion7.Value
   xpdi7=Thisform.txtpdiag7.Value
   xptr7=Thisform.txtptrata7.Value
   xpfe8=Thisform.txtpfecha8.Value
   xppe8=Thisform.txtppeso8.Value
   xpta8=Thisform.txtptalla8.Value
   xpte8=Thisform.txtptempera8.Value
   xppr8=Thisform.txtppresion8.Value
   xpdi8=Thisform.txtpdiag8.Value
   xptr8=Thisform.txtptrata8.Value
   xpfe9=Thisform.txtpfecha9.Value
   xppe9=Thisform.txtppeso9.Value
   xpta9=Thisform.txtptalla9.Value
   xpte9=Thisform.txtptempera9.Value
   xppr9=Thisform.txtppresion9.Value
   xpdi9=Thisform.txtpdiag9.Value
   xptr9=Thisform.txtptrata9.Value
   xpfe0=Thisform.txtpfecha10.Value
   xppe0=Thisform.txtppeso10.Value
   xpta0=Thisform.txtptalla10.Value
   xpte0=Thisform.txtptempera10.Value
   xppr0=Thisform.txtppresion10.Value
   xpdi0=Thisform.txtpdiag10.Value
   xptr0=Thisform.txtptrata10.Value
   BEGIN TRANSACTION
   IF Thisform.estado="N"
      xcom=Thisform.text1.value
      INSERT INTO clientes (ruc,nombre,direccion,telefono,fecnac,hoja,;
      fecha1,peso1,talla1,tempera1,presion1,diag1,trata1,;
      fecha2,peso2,talla2,tempera2,presion2,diag2,trata2,;
      fecha3,peso3,talla3,tempera3,presion3,diag3,trata3,;
      fecha4,peso4,talla4,tempera4,presion4,diag4,trata4,;
      fecha5,peso5,talla5,tempera5,presion5,diag5,trata5,;
      fecha6,peso6,talla6,tempera6,presion6,diag6,trata6,;
      fecha7,peso7,talla7,tempera7,presion7,diag7,trata7,;
      fecha8,peso8,talla8,tempera8,presion8,diag8,trata8,;
      fecha9,peso9,talla9,tempera9,presion9,diag9,trata9,;
      fecha10,peso10,talla10,tempera10,presion10,diag10,trata10,;
      pfecha1,ppeso1,ptalla1,ptempera1,ppresion1,pdiag1,ptrata1,;
      pfecha2,ppeso2,ptalla2,ptempera2,ppresion2,pdiag2,ptrata2,;
      pfecha3,ppeso3,ptalla3,ptempera3,ppresion3,pdiag3,ptrata3,;
      pfecha4,ppeso4,ptalla4,ptempera4,ppresion4,pdiag4,ptrata4,;
      pfecha5,ppeso5,ptalla5,ptempera5,ppresion5,pdiag5,ptrata5,;
      pfecha6,ppeso6,ptalla6,ptempera6,ppresion6,pdiag6,ptrata6,;
      pfecha7,ppeso7,ptalla7,ptempera7,ppresion7,pdiag7,ptrata7,;
      pfecha8,ppeso8,ptalla8,ptempera8,ppresion8,pdiag8,ptrata8,;
      pfecha9,ppeso9,ptalla9,ptempera9,ppresion9,pdiag9,ptrata9,;
      pfecha10,ppeso10,ptalla10,ptempera10,ppresion10,pdiag10,ptrata10) ;
              VALUES(xCom,xnom,xdir,xtel,xfna,xhoj,;
              xfe1,xpe1,xta1,xte1,xpr1,xdi1,xtr1,;
              xfe2,xpe2,xta2,xte2,xpr2,xdi2,xtr2,;
              xfe3,xpe3,xta3,xte3,xpr3,xdi3,xtr3,;
              xfe4,xpe4,xta4,xte4,xpr4,xdi4,xtr4,;
              xfe5,xpe5,xta5,xte5,xpr5,xdi5,xtr5,;
              xfe6,xpe6,xta6,xte6,xpr6,xdi6,xtr6,;
              xfe7,xpe7,xta7,xte7,xpr7,xdi7,xtr7,;
              xfe8,xpe8,xta8,xte8,xpr8,xdi8,xtr8,;
              xfe9,xpe9,xta9,xte9,xpr9,xdi9,xtr9,;
              xfe0,xpe0,xta0,xte0,xpr0,xdi0,xtr0,;
			  xpfe1,xppe1,xpta1,xpte1,xppr1,xpdi1,xptr1,;
              xpfe2,xppe2,xpta2,xpte2,xppr2,xpdi2,xptr2,;
              xpfe3,xppe3,xpta3,xpte3,xppr3,xpdi3,xptr3,;
              xpfe4,xppe4,xpta4,xpte4,xppr4,xpdi4,xptr4,;
              xpfe5,xppe5,xpta5,xpte5,xppr5,xpdi5,xptr5,;
              xpfe6,xppe6,xpta6,xpte6,xppr6,xpdi6,xptr6,;
              xpfe7,xppe7,xpta7,xpte7,xppr7,xpdi7,xptr7,;
              xpfe8,xppe8,xpta8,xpte8,xppr8,xpdi8,xptr8,;
              xpfe9,xppe9,xpta9,xpte9,xppr9,xpdi9,xptr9,;
              xpfe0,xppe0,xpta0,xpte0,xppr0,xpdi0,xptr0)
   Else     && Edicion  ruc=xcom,hoja=xhoj,
      UPDATE clientes SET nombre=xnom,direccion=xdir,telefono=xtel,fecnac=xfna,;
      fecha1=xfe1,peso1=xpe1,talla1=xta1,tempera1=xte1,presion1=xpr1,diag1=xdi1,trata1=xtr1,;
      fecha2=xfe2,peso2=xpe2,talla2=xta2,tempera2=xte2,presion2=xpr1,diag2=xdi2,trata2=xtr2,;
      fecha3=xfe3,peso3=xpe3,talla3=xta3,tempera3=xte3,presion3=xpr3,diag3=xdi3,trata3=xtr3,;
      fecha4=xfe4,peso4=xpe4,talla4=xta4,tempera4=xte4,presion4=xpr4,diag4=xdi4,trata4=xtr4,;
      fecha5=xfe5,peso5=xpe5,talla5=xta5,tempera5=xte5,presion5=xpr5,diag5=xdi5,trata5=xtr5,;
      fecha6=xfe6,peso6=xpe6,talla6=xta6,tempera6=xte6,presion6=xpr6,diag6=xdi6,trata6=xtr6,;
      fecha7=xfe7,peso7=xpe7,talla7=xta7,tempera7=xte7,presion7=xpr7,diag7=xdi7,trata7=xtr7,;
      fecha8=xfe8,peso8=xpe8,talla8=xta8,tempera8=xte8,presion8=xpr8,diag8=xdi8,trata8=xtr8,;
      fecha9=xfe9,peso9=xpe9,talla9=xta9,tempera9=xte9,presion9=xpr9,diag9=xdi9,trata9=xtr9,;
      fecha10=xfe0,peso10=xpe0,talla10=xta0,tempera10=xte0,presion10=xpr0,diag10=xdi0,trata10=xtr0,;
      pfecha1=xpfe1,ppeso1=xppe1,ptalla1=xpta1,ptempera1=xpte1,ppresion1=xppr1,pdiag1=xpdi1,ptrata1=xptr1,;
      pfecha2=xpfe2,ppeso2=xppe2,ptalla2=xpta2,ptempera2=xpte2,ppresion2=xppr1,pdiag2=xpdi2,ptrata2=xptr2,;
      pfecha3=xpfe3,ppeso3=xppe3,ptalla3=xpta3,ptempera3=xpte3,ppresion3=xppr3,pdiag3=xpdi3,ptrata3=xptr3,;
      pfecha4=xpfe4,ppeso4=xppe4,ptalla4=xpta4,ptempera4=xpte4,ppresion4=xppr4,pdiag4=xpdi4,ptrata4=xptr4,;
      pfecha5=xpfe5,ppeso5=xppe5,ptalla5=xpta5,ptempera5=xpte5,ppresion5=xppr5,pdiag5=xpdi5,ptrata5=xptr5,;
      pfecha6=xpfe6,ppeso6=xppe6,ptalla6=xpta6,ptempera6=xpte6,ppresion6=xppr6,pdiag6=xpdi6,ptrata6=xptr6,;
      pfecha7=xpfe7,ppeso7=xppe7,ptalla7=xpta7,ptempera7=xpte7,ppresion7=xppr7,pdiag7=xpdi7,ptrata7=xptr7,;
      pfecha8=xpfe8,ppeso8=xppe8,ptalla8=xpta8,ptempera8=xpte8,ppresion8=xppr8,pdiag8=xpdi8,ptrata8=xptr8,;
      pfecha9=xpfe9,ppeso9=xppe9,ptalla9=xpta9,ptempera9=xpte9,ppresion9=xppr9,pdiag9=xpdi9,ptrata9=xptr9,;
      pfecha10=xpfe0,ppeso10=xppe0,ptalla10=xpta0,ptempera10=xpte0,ppresion10=xppr0,pdiag10=xpdi0,ptrata10=xptr0 WHERE ruc=xcom
   ENDIF
   END TRANSACTION
   Thisform.Release
ENDIF
Thisform.Refresh
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
Revisar política de publicidad