Menu

#4 compile error in dbconnect.cpp

open
nobody
None
5
2005-01-31
2005-01-31
Anonymous
No

The DBConnection constructor using a Config File uses
the variable name configFile twice.

If I rename one from configFile to configFileName,
compiling works.

dbconnect.cpp, ln 121

//------------------------------------------------------------------------------
DbConnection::DbConnection(
Driver driver,
const string &configFileName)
:
ptr_getAuthor(NULL),
ptr_getVendor(NULL),
ptr_getCopyright(NULL),
ptr_getDriverType(NULL),
ptr_getDriverName(NULL),
ptr_getDriverDesc(NULL),
ptr_getDbConnectVersion(NULL),
ptr_createDriverInstance(NULL),
ptr_destroyDriverInstance(NULL),
drvRef(NULL)
{
// Build the compatibility table.
_buildCompatibilityTable();

.
.
.

// 1. Use the file iif given in configFile param.
if (configFileName.length() > 0)
{
// Try and read the information from the config file.
ConfigFile configFile(configFileName.c_str());
configFile.read();

if (configFile.hasKeyName("dbconnect", "driverPath"))
{
driverPath =
configFile["dbconnect"]["driverPath"];
// Make sure we have a proper path

Discussion


Log in to post a comment.

MongoDB Logo MongoDB