--- parser3/src/sql/oracle/Attic/parser3oracle.C 2001/08/27 12:02:24 1.14 +++ parser3/src/sql/oracle/Attic/parser3oracle.C 2001/09/05 08:57:43 1.16 @@ -7,7 +7,7 @@ 2001.07.30 using Oracle 8.1.6 [@test tested with Oracle 7.x.x] */ -static const char *RCSId="$Id: parser3oracle.C,v 1.14 2001/08/27 12:02:24 parser Exp $"; +static const char *RCSId="$Id: parser3oracle.C,v 1.16 2001/09/05 08:57:43 parser Exp $"; #include "config_includes.h" @@ -117,15 +117,18 @@ public: /// get api version int api_version() { return SQL_DRIVER_API_VERSION; } /// initialize driver by loading sql dynamic link library - const char *initialize(const char *dlopen_file_spec) { + const char *initialize(const char *dlopen_file_spec) { + const char *error=dlopen_file_spec? dlink(dlopen_file_spec):"client library column is empty"; - if(!error) { + if(!error) { + // error="OCIInitialize replacer";/* OCIInitialize((ub4)OCI_THREADED, (dvoid *)0, (dvoid * (*)(void *, unsigned int))0, (dvoid * (*)(void*, void*, unsigned int))0, - (void (*)(void*, void*))0 ); + (void (*)(void*, void*))0 ); + // */ } @@ -218,8 +221,10 @@ public: // return created connection *(OracleSQL_connection_struct **)connection=&cs; } - void disconnect(void *connection) { - return; + void disconnect(void *connection) { + + return; + OracleSQL_connection_struct &cs=*(OracleSQL_connection_struct *)connection; // Terminate a user session @@ -765,11 +770,16 @@ private: // conn client library funcs private: // conn client library funcs linking const char *dlink(const char *dlopen_file_spec) { - if(lt_dlinit()) - return lt_dlerror(); - - lt_dlhandle handle=lt_dlopen(dlopen_file_spec); - //return "hren31"; + if(lt_dlinit()) + + return lt_dlerror(); + + + + lt_dlhandle handle=lt_dlopen(dlopen_file_spec); + + //return "hren31"; + if(!handle) return lt_dlerror(); //"can not open the dynamic link module"; @@ -909,7 +919,7 @@ void tolower(char *out, const char *in, *out++=tolower(*in++); } -extern "C" SQL_Driver *create() { +extern "C" SQL_Driver *SQL_DRIVER_CREATE_FUNC_NAME() { //_asm int 3; return OracleSQL_driver=new OracleSQL_Driver(); }