string ls_defaultdir,ls_dbq
//数据库所在路径
ls_defaultdir=GetCurrentDirectory()
ls_dbq=ls_defaultdir+'/test.mdb'
SQLCA.DBParm = "ConnectString='DSN=MS Access Database;UID=admin;PWD=;DefaultDir="+ls_defaultdir+";DBQ="+ls_dbq+";'"
SQLCA.DBMS = "ODBC"
SQLCA.AutoCommit = True
connect using sqlca;
if sqlca.sqlcode<>0 then
messagebox('err','sad'+sqlca.sqlerrtext)
else
messagebox('..','not sad')
end if