I need to backup the database and all tables to a pendrive. About a year
ago I made a form using the drivetype function to detect that the
pendrive had in effect been plugged to the machine.
It worked like a charm, but then, the OS was XP Prof.
Now the client switched to W7 Home Premium and the function does not work.
What it does is say, "yes, there is a pendrive there", when in fact
there is none.
_I am using VFP9 SP 1_.
If you are curious, a snippet of the code I use is:
local cDrives,cLetter,lOK
lOK = .f.
cDrives
=[D:,E:,F:,G:,H:,I:,J;,K;,L:,M:,N:,O:,P:,Q:,R:,S:,T:,U:,V:,W:,X:,Y:,Z:]
For i = 1 to GetWordCount(cDrives,[,])
cLetter = GetWordNum(cDrives,i,[,])
If InList(DriveType(cLetter),2,4)
lOK = .t.
thisform.cDriveLetter = cLetter
exit
else
lOK = .f.
endif
EndFor
Return lOK
The computer has 5 "buil-in" usb ports (G,H,I,J,K)
When the above loop reaches the G letter (or if I modify the cDrives
string, the H,or I, etc. letters) it initializes the lOK variable to
.T., when in reality, theres is no pendrive attached.
Why would this be? Is there any incompatibility with the DriveType
function and Windows 7?
TIA
Rafael Copquin
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.