Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Close all cursors tables
Message
De
10/08/2006 03:13:50
 
 
À
09/08/2006 22:48:53
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01144391
Message ID:
01144437
Vues:
12
>Dear all,
>
>I started to use comboboxes attached with individual cursor tables to avoid conflicts amongst controls... that's means a lot of cursor tables created in init events...
>
>however, the problem is to close... is there anyways to close "just" the cursor tables opened, since I don't want to close the base tables...
>
>I do something like this, but I think it is stupid?!
>
>DIMENSION cursor_tb[3]
>cursor_tb[1] = "cur_dx1"
>cursor_tb[2] = "cur_dx2"
>cursor_tb[3] = "certificate1"
>
>FOR x = 1 TO ALEN(cursor_tb)
>	IF USED(cursor_tb[x])
>		USE IN (cursor_tb[x])
>	ENDIF
>ENDFOR
>
My immediate reaction was, why bother? With more than 32000 available work areas, you will most likely not run out of resources. But if you really need to close all cursors, you can do something like
lnMax=aused(temp)
for x=1 to lnMax
  if JUSTPATH(DBF(temp(x,1)))=sys(2023) && Cursor
    use in temp(x,1)
  endif
endfor
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform