Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Odbccp32
Message
De
16/03/2004 11:15:58
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00886660
Message ID:
00886706
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform