Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Make determination, are we in production or in developme
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00500222
Message ID:
00500276
Views:
25
This message has been marked as the solution to the initial question of the thread.
>>>Hi everybody,
>>>
>>>Here is the our situation:
>>>We have Live server, there resides working versions of all our applications+DataBases
>>>We have Development server, this has the same structure, as Live, but the current working versions of all applications.
>>>
>>>Each developer also has its own local system, which replicates the Development server and there are supposed to be the most current versions (versions in work). (I myself found this system to be too complicated, so I usually work directly on Development server, but this is not right).
>>>
>>>Anyway, my question is: how can we determine, is it Live system or Development system inside the application? The simplest way which I currently implemented would be check to sys(5) (G is our Development drive). Obviously, this is not the right method, since User's could be mapped differently.
>>>
>>>Do you have ideas?
>>>
>>>Thanks a lot in advance.
>>
>>This thought if you're trying to determine which server, get the sever name. They're different, right?
>
>How can I receive the shared name? Of course, they are different.

How about ANETRESOURCES()? Or
oNet = CREATEOBJECT('WScript.Network')
oDrives = oNet.EnumNetworkDrives
Or
DECLARE INTEGER WNetGetConnection IN Win32API;
 STRING @lpszLocalName, STRING @lpbuffer, INTEGER @lnbufsize
* lcdrive is the drive (with the colon) of interest
lcbuffer = SPACE(200)
IF WNetGetConnection(@lcdrive, @lcbuffer, 200) = 0
  ? LEFT(lcbuffer, AT(CHR(0), lcbuffer) - 1)
ENIDF
>In the meantime I came up with the simplest solution, which I'm going to discuss between team members. We have a table called System, which contains path and temppath fields. We can add one additional field for this determination.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform