Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find in which DS the particular table is open - Urgent h
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00430461
Message ID:
00430490
Vues:
22
Hi Vlad,

I knew you would be the first, who would try to answer :)
Actually, my manager just came to my place and asked me, do I know an answer on this question (how to determine in which DS the particular alias (table) is opened). I thought a little and said: 'There is no way to find this info'.
Your message basically confirms this statement. Or, at least, there is no easy way to find it.

Now, let's consider this situation:
Say, we have a form with private DS and some tables opened. Table1, Table2, etc.
You're sitting in this private DS and check
?used('Table1')
return .t.

You switch to default DS and check used('Table1') What does it return?

Also, how can you find out, how many and their IDs DS do you have?
Mike Helland suggested one approach here (using On Error idea).

Thanks for your help.

>Hi!
>
>In VFP 6 there are no way to scan all data sessions to find alias. You will need to write special code in the load method of your form to register, and code in destroy method to unregister data sessions. Store them in the public array. Than you will know which data sessions opened and can easy scan all of them for required alias.
>
>Hope this helped.
>
>>Is there a way to find out in which DS (number) the particular table (alias) is opened? May be VFP function?
>>
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform