--- parser3/src/main/pa_sql_driver_manager.C 2006/04/09 13:38:47 1.86 +++ parser3/src/main/pa_sql_driver_manager.C 2008/06/26 09:41:55 1.88 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_SQL_DRIVER_MANAGER_C="$Date: 2006/04/09 13:38:47 $"; +static const char * const IDENT_SQL_DRIVER_MANAGER_C="$Date: 2008/06/26 09:41:55 $"; #include "pa_sql_driver_manager.h" #include "ltdl.h" @@ -115,10 +115,11 @@ SQL_Driver_manager::~SQL_Driver_manager( /// @param aurl protocol://[driver-dependent] SQL_Connection* SQL_Driver_manager::get_connection(const String& aurl, Table *protocol2driver_and_client, - const char* arequest_charset) { + const char* arequest_charset, + const char* adocument_root) { // we have table for locating protocol's library if(!protocol2driver_and_client) - throw Exception("parser.runtime", + throw Exception(PARSER_RUNTIME, &aurl, "$"MAIN_SQL_NAME":"MAIN_SQL_DRIVERS_NAME" table must be defined"); @@ -138,7 +139,7 @@ SQL_Connection* SQL_Driver_manager::get_ else { // no cached connection or it were unpingabe: connect/reconnect url_cstr=aurl.cstrm(); if(!strstr(url_cstr, "://")) - throw Exception("parser.runtime", + throw Exception(PARSER_RUNTIME, aurl.length()?&aurl:0, "connection string must start with protocol://"); @@ -158,13 +159,13 @@ SQL_Connection* SQL_Driver_manager::get_ Table::Action_options options; if(protocol2driver_and_client->locate(0, protocol, options)) { if(!(library=protocol2driver_and_client->item(1)) || library->length()==0) - throw Exception("parser.runtime", + throw Exception(PARSER_RUNTIME, 0, "driver library column for protocol '%s' is empty", protocol_cstr); dlopen_file_spec=protocol2driver_and_client->item(2); } else - throw Exception("parser.runtime", + throw Exception(PARSER_RUNTIME, &aurl, "undefined protocol '%s'", protocol_cstr); @@ -220,7 +221,7 @@ SQL_Connection* SQL_Driver_manager::get_ put_driver_to_cache(protocol, driver); } - connection=new SQL_Connection(aurl, *driver, arequest_charset); + connection=new SQL_Connection(aurl, *driver, arequest_charset, adocument_root); // associate with pool[request] (deassociates at close) connection->set_url(); }