thanks for the info, i will try it tomorrow, i renamed the function to packingaccess for my own sake to follow what the code was doing.
Slán
~M
>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
Go raibh maith agat
~M