Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Whats bad about Visual Foxpro
Message
From
17/07/2001 02:55:10
 
 
To
17/07/2001 02:53:54
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00530878
Message ID:
00531389
Views:
30
(I hate when that happens)

Let me clarify: Of COURSE SYS(0) works in regular VFP -- I was referring to the OLE DB provider.

>I'll go you one better on that one: You can (somewhat) integrate a DBC with Windows security by using the SYS(0) function to validate a user versus a free table of permissible users.
>
>Two things here that are relevent -- a "doh!" and a "hmm" :
>
>The "doh!" is that any table you open in BeforeOpenTables has to be a free table (NOT the same DBC) or VFP will go into a loop until it dies because it'll endlessly recurse into the BeforeOpenTables for obvious reasons.
>
>The "hmm" here is that while the VFP 7 docs state that SYS(0) -- login and machine name -- does not work, it does. Whoops.
>
>
>>The specific Event is the BeforeOpenTable. All you have to do is check for the existence of something like an application object or some other obscure memory variable that is created by the VFP app when it launches. It could also accept a parameter that , if valid, would allow the access to the table. If it does not exist or an invalid parameter is passed, then some rogue outside source is trying to open the table. Just RETURN .F. in your event code to prevent the opening of the table.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform