Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Strange build error with OleDB
Strange build error with OleDB [message #41273] Fri, 22 November 2013 15:29
NeilMonday is currently offline  NeilMonday
Messages: 15
Registered: May 2013
Promising Member
Hello all,

I am getting an error, and I do not know what the root cause is. This error does NOT occur when building the OleDB package, but it does occur when building my application's package. Here is the error:

...
SqlManager.cpp
C:\Tools\upp\uppsrc\OleDB/OleDB.h(79) : error C2248: 'Upp::Link<T>::Link' : cannot access private member declared in class 'Upp::Link<T>'
        with
        [
            T=Upp::OleDBConnection
        ]
        c:\tools\upp\uppsrc\core\Other.h(292) : see declaration of 'Upp::Link<T>::Link'
        with
        [
            T=Upp::OleDBConnection
        ]
        This diagnostic occurred in the compiler generated function 'Upp::OleDBSession::OleDBSession(Upp::OleDBSession &)'
...


My class, SqlManager, has the following:
#ifndef _ContactTuner_SqlManager_h_
#define _ContactTuner_SqlManager_h_

#include <Core/Core.h>

#ifdef WIN32
    #define _OLEDB_DB_
#else
    #define _MYSQL_DB_
#endif

using namespace Upp;

#define MODEL "ATaS.sch"

#ifdef _OLEDB_DB_
	#include <OleDB/OleDB.h>
	#define SCHEMADIALECT <OleDB/OleDBSchema.h>
	typedef OleDBSession DBSession;
#endif

#ifdef _MYSQL_DB_
	#include <MySql/MySql.h>
	#define SCHEMADIALECT <MySql/MySqlSchema.h>
	typedef MySqlSession DBSession;
#endif

#undef DOMAIN

#include <Sql/sch_header.h>

class SqlManager
{
public:
...
	DBSession GetATaSSession();
	DBSession GetAESession();

private:
...
	DBSession dbATaS;
	DBSession dbAE;
};
#endif


Implementation is:
#include "SqlManager.h"
#include <Sql/sch_schema.h>
#include <Sql/sch_source.h>

...
DBSession SqlManager::GetATaSSession() { 
	return dbATaS;
}

DBSession SqlManager::GetAESession() { 
	return dbAE;
}
Previous Topic: Call external funcions in SQL
Next Topic: SQLite and foreign keys
Goto Forum:
  


Current Time: Fri Mar 29 01:03:14 CET 2024

Total time taken to generate the page: 0.01918 seconds