Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing cursor in private DS form to another form
Message
De
15/12/1998 05:22:10
 
 
À
15/12/1998 01:37:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00166961
Message ID:
00167565
Vues:
18
>>>I need to pass a cursor that resides in a form with data session set to private to another form. I know it kind of defeats the whole purpose of having a DS that's private and wanting to do this but I have the need nonetheless. I know I can't pass a whole cursor as a parameter (w/o using ADO?) but is there another way?
>>
>>Sure - pass the data session ID and alias as parameters, and do something like:
>>
>>LPARAMETERS nDataSessionID, cAlias
>>* Note - no error checking. I'd add it.
>>LOCAL nMyDataSessionAtStart
>>nMyDataSessionAtStart = SET('DATASESSION')
>>SET DATASESSION TO nDataSessionID
>>LOCAL cDBFReference
>>cDBFReference = DBF(cAlias)
>>SET DATASESSION TO nMyDataSessionAtStart
>>USE (cDBFReference) AGAIN SHARED IN 0 ALIAS WhatEver
>Wouldn't this cause problems if we have some data bound controls ???

Not unless one of the sessions needed exclusive use of the cursor; you can open a table or cursor several times without difficulties. The record pointers move independently of each other, so it won't cause a form with another 'use' of the cursor to shft records unexpectedly. This is no different than having two datasessions open the same table...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform