MDAC must be installed on the target machine. Program Code is as follows:
string ls_string, gs_apppath
gs_apppath = getcurrentdirectory ()
gs_apppath = gs_apppath + "/"
// determine whether the access driver has been installed on the system.
string ls_sys, ls_install
ls_sys = "HKEY_LOCAL_MACHINE/software/ODBC/odbcinst. INI/ODBC drivers "
registryget (ls_sys," Microsoft Access Driver (*. MDB) ", regstring !, Ls_install)
If trim (ls_install) <> "installed" then
MessageBox ("error", "Microsoft Access driver not installed ")
halt
end if
ls_string = "db1.mdb"
sqlca. DBMS = "ODBC"
sqlca. autocommit = false
sqlca. dbparm = "connectstring = 'driver = Microsoft Access Driver (*. MDB); "+ &
" uid = admin; "+ &
" Pwd =; "+ &
" usercommitsync = yes; "+ &
" Threads = 3; "+ &
" safetransactions = 0; "+ &
" pagetimeout = 5; "+ &
" maxscanrows = 8; "+ &
" maxbuffersize = 2048; "+ &
" fil = MS access; "+ &
" driverid = 25; "+ &
" defaultdir = "+ gs_apppath + "; "+ &
" DBQ = "+ ls_string +" '"
Connect;
If sqlca. sqlcode = 0 then
Open (w_main)
Else
Halt
End if
/* The following dynamic libraries are required
Pbodb90.dll
Pbdwe90.dll
Pbvm90.dll
Libjcc. dll
Libjlog. dll
*/