Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data session info.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00344447
Message ID:
00344457
Views:
18
>Hello All,
> What can I do to set data session to the one I want if I only know the name of it(not the number) ?? Thanks
>sherry

Do you know the name of the form?
procedure GetFormDSID
*
lparameter tcFormName
if vartype(tcFormName) <> "C"
   return .null.
endif
local i, oForm, lnDSID, lcForm
lnDSID = .null.
lcForm = upper(alltrim(tcFormName))
for i = 1 to _screen.formcount
    if upper(_screen.forms(i).name) = lcForm
       oForm = = _screen.forms(i)
       exit
    endif
next
if vartype(oForm) = "O" and NOT isnull(oForm)
   lnDSID = oForm.DataSessionID
endif
return lnDSID
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform