Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help - Cannot Access The Selected Table (Error 1152)
Message
 
 
À
24/07/2001 17:57:28
Peter Wagner
Point Informática Ltda.
Limeira, Brésil
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00534701
Message ID:
00534758
Vues:
10
The variables cbo1 and cbo2 are local to your function and therefore are destroyed at the end of it. When time comes to evaluate cboQuadra.ROWSOURCE and cboLote.ROWSOURCE the variables cbo1 and cbo2 don't exist anymore. To resolve this you can add new properties cbo1 and cbo2 to the form and use them instead
thisform.cbo1 = ...
...
   ... cod_loteamento = thisform.cbo1
Or you can use cursors cur_quadras and cur_lotes you already created
WITH THISFORM
	.cboQuadra.ROWSOURCE = "cur_quadras"
	.cboQuadra.ROWSOURCETYPE = 2   && alias
	.cboLote.ROWSOURCE = "cur_lotes"
	.cboLote.ROWSOURCETYPE = 2
ENDWITH
>I have 3 combos in a form (cbo1, cbo2, cbo3)the second combo cbo2 value depends ond the value chossen in cbo1 and the same happends with cbo3.
>
>When I move the pointer in the table, I allways rebuild the cursors on which cbo2 and cbo3 are based calling a function.
>
>The function is below:
>
* Get value of combo1 to update cbo2
>SELECT("v_clientes_")
>cbo1 = v_clientes_.loteamento
>SELECT nome_num, codigo FROM quadras WHERE DELETED() <> .T. ;
>AND cod_loteamento = cbo1 ORDER BY nome_num INTO CURSOR cur_quadras
>
>* Get value of combo2 to update cbo3
>SELECT("v_clientes_")
>cbo2 = v_clientes_.quadra
>old_area = SELECT()
>
>SELECT numero, codigo FROM lotes WHERE DELETED() <> .T. ;
>AND cod_quadra = cbo2 ORDER BY numero INTO CURSOR cur_lotes
>
>WITH THISFORM
>	.cboQuadra.ROWSOURCE = "SELECT nome_num, codigo FROM quadras ;
>         WHERE DELETED() <> .T. AND cod_loteamento = cbo1 ;
>         order by nome_num INTO CURSOR cur_quadras"
>	.cboQuadra.ROWSOURCETYPE = 3
>	.cboLote.ROWSOURCE = "SELECT numero, codigo FROM lotes ;
>         WHERE lotes.Status = stat_venda AND DELETED() <> .T. ;
>         AND cod_quadra = cbo2 order by numero INTO CURSOR cur_lotes"
>	.cboLote.ROWSOURCETYPE = 3
>ENDWITH
>SELECT("v_clientes_")
>
>*Problem is here -> when execute the next command it returns Error 1152 and *the combo disapears from the form. It seems that the Rowsource from cbo2 and *cbo3 = ""
>THISFORM.REFRESH
>
>
>* Cannot access the selected table (Error 1152)
>* You have attempted to select a table outside the 32K work area range
>* or are attempting to reference a file variable in a table that is not open.
>
>* Using VFP6.0 + SP5
>
>Does someone knows why it's happening and how to solve this ??
>
>Thanks in Advance
>
>Peter
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform