00001 * Define connect string 00002 * 00003 D Connect C 'DSN=MS Access 97 Database;- 00004 D DBQ=Inventory.mdb;- 00005 D DriverId=25;- 00006 D FIL=MS Access;- 00007 D MaxBufferSiz' 00008 D MsgText S 30A 00009 D Status S 1 00010 00011 * Pass connect string to ODBC part 00012 C Eval %SetAtr('MAIN':'ODBC':'ConnectStr')=Connect 00013 C 00014 C* Issue the command to connect to the Database 00015 C 00016 C Eval %SetAtr('MAIN':'ODBC':'Connect')=1 00017 C 00018 C* Check the Status of the Connection 00019 C EVAL Status=%getatr('MAIN':'ODBC':'Connected') 00020 C 00021 C If Status = 1 00022 C Eval MsgText = 'Connection Succesful' 00023 C Else 00024 C Eval MsgText = 'Connection Failed' 00025 C EndIf