Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odbccp32
Message
From
16/03/2004 11:15:58
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00886660
Message ID:
00886706
Views:
16
Never see the funtion "packingaccess".... but try with this little changes...
So, you can see true error message.

Regards.-
-----------------


DECLARE short packingaccess in odbccp32.dll Integer, Integer, String, String
DECLARE integer FormatMessage IN kernel32.DLL ;
integer dwFlags, string @lpSource, integer dwMessageId, ;
integer dwLanguageId, string @lpBuffer, integer nSize, ;
integer Arguments
DECLARE long GetLastError in KERNEL32.DLL


lcFile = "D:\company\userdb.mdb"

IF packingaccess(0,1,"Microsoft Access Driver (*.mdb)","COMPACT_DB= " + lcFile)=0
lnError = GetLastError()
lpBuffer = SPACE(128)
FormatMessage(0x00001000, ;
'WINERROR.H', lnError, 0, @lpBuffer, 128 , 0)
MESSAGEBOX( SUBSTR( lpBuffer, 1, AT( CHR(0), lpBuffer ) - 1) )

else
messagebox(success)
Endif
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform