00001 #include "dbmi.h" 00002 #include "macros.h" 00003 00010 db_open_database (driver, handle) 00011 dbDriver *driver; 00012 dbHandle *handle; 00013 { 00014 int ret_code; 00015 00016 /* start the procedure call */ 00017 db__set_protocol_fds (driver->send, driver->recv); 00018 DB_START_PROCEDURE_CALL(DB_PROC_OPEN_DATABASE); 00019 00020 /* send the arguments to the procedure */ 00021 DB_SEND_HANDLE (handle); 00022 00023 /* get the return code for the procedure call */ 00024 DB_RECV_RETURN_CODE(&ret_code); 00025 00026 if (ret_code != DB_OK) 00027 return ret_code; /* ret_code SHOULD == DB_FAILED */ 00028 00029 /* no results */ 00030 return DB_OK; 00031 }