FoxPro/Visual FoxPro - No hay ninguna tabla abierta en el area de trabajo actual

 
Vista:
sin imagen de perfil
Val: 313
Bronce
Ha mantenido su posición en FoxPro/Visual FoxPro (en relación al último mes)
Gráfica de FoxPro/Visual FoxPro

No hay ninguna tabla abierta en el area de trabajo actual

Publicado por Jose Francisco (166 intervenciones) el 25/09/2017 22:31:35
ESTIMADOS , ESTOY DESARROLLANDO UN SISTEMA DE PRESUPUESTOS, RECIBOS, REMITOS, STOCK,,EN EL QUE ESTOY BASTANTE AVANZADO .-

HAY UNA PARTE EN EL MODULO REMITO DONDE ABRO UN FORMULARIO CON UN GRID DONDE ELIJO DE LA LISTA UN PRESUPUESTO ASOCIADO PARA TRANSFORMARLO EN REMITO.-

TODO BIEN , LO LEVANTO BIEN PERO TENGO QUE PONER EL GRID FINAL DEL MODULO REMITO EN ENABLED=.F. YA QUE SI HAGO CLICK EN EL GRID FINALPARA ELEGIR MAS DATOS me sale el mensaje: No hay ninguna tabla abierta en el area de trabajo actual.-
(SI GRABO GRABA BIEN , EL TEMA SI HAGO CLICK EN EL GRID)
O SEA QUE ESTO PASA LUEGO DE HABER CERRADO EL FORMULARIO.-

COMO CONSERVO LAS TABLAS ABIERTAS EN FOXPRO 9?
SET CARRY? QUE ES ?

AGUARDO RESPUESTA
GRACIAS
SALUDOS
JOSÉ.-
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
sin imagen de perfil
Val: 1.011
Oro
Ha mantenido su posición en FoxPro/Visual FoxPro (en relación al último mes)
Gráfica de FoxPro/Visual FoxPro

No hay ninguna tabla abierta en el area de trabajo actual

Publicado por Fidel José (657 intervenciones) el 25/09/2017 22:41:49
No me resulta claro el tema, porque no dices si tienes algo programado en un evento click.
De todos modos, puedes intentar con lo siguiente:
En el Evento AfterRowColChange del grid colocal esto:
SELECT (this.RecordSource)

SET CARRY es un comando que te permite copiar automáticamente los datos del último registro en el registro nuevo que se crea.
A mi no me gusta. No puede esperase nada bueno de eso. Estaba pensado para los FOX BASE de uso interactivo (dbase III por ejemplo).
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar
sin imagen de perfil
Val: 313
Bronce
Ha mantenido su posición en FoxPro/Visual FoxPro (en relación al último mes)
Gráfica de FoxPro/Visual FoxPro

No hay ninguna tabla abierta en el area de trabajo actual

Publicado por Jose Francisco (166 intervenciones) el 26/09/2017 01:28:19
Estimado Fidel, en el evento AfterRowColChange del grid estaba bien:(te paso el código)

LPARAMETERS nColIndex
SELECT 2
articulo=xart1rem.articulo
IF LEN(ALLTRIM(articulo))=0
replace xart1rem.nrocomb with ThisForm.txtnrocomb.value
replace xart1rem.desc WITH 0
ENDIF
***********EL TEMA ES QUE ESTABA MAL UN SELECT EN UNA LINEA DEL PROGRAMA ******, YA QUE ESTUVE COPIANDO Y REEMPLAZANDO TABLAS.-

***DE TODOS MODOS TU AYUDA HIZO QUE REPASE TODOS LOS SELECT ***

TE QUISE CALIFICAR CON UN 10 PERO ESTA WEB AL HACER CLICK EN ESE CONTADOR ME DEJA EL NRO 1 "
YA ME PASÓ DOS VECES FUNCIONA BIEN EL CALIFICADOR?

MUCHAS GRACIAS
SALUDOS
JOSÉ
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
Val: 1.011
Oro
Ha mantenido su posición en FoxPro/Visual FoxPro (en relación al último mes)
Gráfica de FoxPro/Visual FoxPro

No hay ninguna tabla abierta en el area de trabajo actual

Publicado por Fidel José (657 intervenciones) el 26/09/2017 17:16:48
José:
En general te recomiendo que evites este SELECT 2, SELECT 3, SELECT 49
Siempre es mejor utilizar SELECT Alias_Tabla. Eso va de acuerdo con el método de apertura de tablas
USE (lcTabla) IN 0 SHARED && FUERZA a ocupar la primer area de trabajo libre.

Si el nombre de la tabla o cursor está contenido en una variable de memoria o en una propiedad
SELECT (lcAlias_Tabla)

SELECT (thisform.Tabla_Clientes)

En muchos casos verás que es bueno utilizar un cursor de nombre único (recurriendo a SYS(2015) )

lcCursor = "cur"+sys(2015)
SELECT * FROM CLIENTES WHERE CUIT == lcCuit into Cursor (lcCursor) READWRITE
SELECT (lcCursor)
browse
Utilizar esta mecánica en formularios de paso evita conflictos de nombre de cursores (lo que haría que el nuevo cursor reemplace al viejo y se produzcan incoherencias)

Para el caso de un control grid, dentro del control, lo mejor es referirse al cursor o tabla asociada, que viene dado por la propiedad RecordSource. De ahi

SELECT (this.recordSource)

Eso te independiza absolutamente de en qué area esta abierto un cursor y también, para el caso del control grid, de qué nombre de cursor o tabla se trata.

Esto es fundamental para elaborar una clase grid. Pero también te puede servir para cualquier formulario que tenga un control grid.
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
Val: 313
Bronce
Ha mantenido su posición en FoxPro/Visual FoxPro (en relación al último mes)
Gráfica de FoxPro/Visual FoxPro

No hay ninguna tabla abierta en el area de trabajo actual

Publicado por Jose Francisco (166 intervenciones) el 27/09/2017 00:16:32
De acuerdo Fidel , lo tendré en cuenta , pero yo por lo general escribo todas las select " con el area de trabajo o tabla " en el init del formulario y me fue muy bien.-
Realicé otro programa bastante extenso que lo están utilizando y no he tenido problemas.-
Te paso algún código de un init de un formulario.
Luego en las "otras pantallas o grid " utilizo sólo select 1, select 2, select 44 , etc,,,, ya que sino el prg me dice que la tabla está en uso.(ya que están siendo levantadas en el init) Te aclaro que trato de no utilizar cursores como los que se cargan el el "entorno de datos" (para mejorarar la memoria), únicamente los utilizo para alguna relación entre dos tablas con algún campo de combinación.-
te paso lo que cargo en el init del formulario:
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
THISFORM.combo3.enabled=.f.
THISFORM.combo4.enabled=.f.
THISFORM.combo5.enabled=.f.
thisform.txtarticulo.Enabled=.t.
SELECT 1
USE remito.dbf IN 1 ALIAS xrem shared
*shared significa compartido*
SET ORDER TO nro
GO TOP
thisform.grid3.enabled =.t.
thisform.grid3.recordsource = "xrem"
 
*thisform.form1.recordsource = "xrem"
************************************************************
SELECT 2
USE art1rem.dbf IN 2 ALIAS xart1rem shared
Thisform.grid1.recordSource="xart1rem"
THISFORM.GRID1.Refresh
****************************************************
SELECT 4
USE articulosm.dbf IN 4 ALIAS xartm shared
*shared significa compartido*
SET ORDER TO codart
GO top
*SET MULTILOCKS ON
*CURSORSETPROP("Buffering", 5, "xart1rem")
 
*thisform.grid2.visible =.f.
*thisform.grid2.recordsource = "xartm"
thisform.check1.Visible=.t.
thisform.check1.Enabled=.f.
thisform.txttipo.Enabled=.f.
thisform.txttxr.Enabled=.f.
thisform.txtpventa.Enabled=.f.
thisform.txtnro.Enabled=.f.
thisform.txtnrocomb.Enabled=.f.
thisform.txtsr.Enabled=.f.
thisform.txtdni.Enabled=.f.
thisform.txtnombre.Enabled=.f.
thisform.txtdireccion.Enabled=.f.
thisform.txtciudad.Enabled=.f.
thisform.txtform_pago.Enabled=.f.
thisform.txttipo_op.Enabled=.f.
thisform.txtcantcuotas.Enabled=.f.
thisform.txtvalorcuota.Enabled=.f.
thisform.txtcostodol.Enabled=.f.
thisform.txtcotizdolar.Enabled=.f.
thisform.txtcostopesos.Enabled=.f.
thisform.txtsubtsd.Enabled=.f.
thisform.txtsubtotal.Enabled=.f.
thisform.txtimpuestos.Enabled=.f.
thisform.txtsubtcimp.Enabled=.f.
thisform.txtganancia.Enabled=.f.
thisform.txtiva.Enabled=.f.
thisform.txttipo_op.Enabled=.f.
thisform.txtform_pago.Enabled=.f.
thisform.txtdesct.Enabled=.f.
thisform.txtdescpesos.Enabled=.f.
thisform.txttotal.Enabled=.f.
thisform.txtobserv.Enabled=.f.
thisform.txtgom.Enabled=.f.
SET FILTER TO nrocomb == ThisForm.txtnrocomb.Value IN "xart1rem"
*Aqui hago un click en el grid3 para que tome el encabezado delos campos
thisform.grid3.Click
thisform.txtarticulo.Enabled=.f.
*thisform.txtcant.Value=1
*para poner todo en enabled=.t.
*thisform.volver.Click
 
*IF thisform.check1.Value=1
thisform.numerico2.visible=.f.
thisform.alfabetico2.visible=.f.
thisform.texto11.visible=.f.
thisform.documento2.visible=.f.
*PUBLIC xf as Character
*xf=""
*xf="c:\prgneg\logo.jpg"
*thisform.image1.Picture=xf
SELECT 8
    USE datoslogo.dbf IN 8 ALIAS xlogo shared
datoslogo=""
*xf=""
thisform.txtdatoslogo.Value=datoslogo
xf=logo
thisform.image1.Picture=xf
 
SELECT 11
USE clientes.dbf IN 11 ALIAS xcli shared
 
Thisform.o_combobox1.Enabled=.f.
 
thisform.alfabetico1.visible=.f.
thisform.numerico1.visible=.f.
thisform.texto10.visible=.f.
thisform.documento1.visible=.f.
thisform.grid1.Enabled=.t.
thisform.guardar.Enabled=.f.
thisform.volver.Enabled=.f.
thisform.nuevo.Enabled=.t.
thisform.editar.Enabled=.f.
thisform.borrar.Enabled=.f.
thisform.imprimir.Enabled=.f.
*thisform.guardar.enabled=.f.
*thisform.guardamod.enabled=.f.
thisform.texto1.Value=DATE()
SELECT 9
USE cotizdolar.dbf IN 9 ALIAS xcotd SHARED
GO BOTTOM
thisform.txtcotizdolar.value=cotizdolar
 
SELECT 44
USE artmtempo.dbf IN 44 ALIAS xartmt SHARED

Gracias
En algún momento probaré lo que me indicas.-
Saludos
José
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