G
Guest
Hi,
I am new to .Net, ADO.Net and i have to programm an independent dataprovider
(no sql, no oledb, no odbc) and in addition it has to be in visual c++
untill now i have two classes.
Class Conn derived from IDbConnection and class comm derived from idbcommand.
so my problem is the method 'Comm* CreateCommand' in class Conn, i allways
get the error message error C2392: ..... : Covariant-Returntype
WTF is that?????
__gc class Comm;
__gc class Conn : public IDbConnection
{
......
Comm* CreateCommand(){Comm* cmd = new Comm();
cmd->set_Connection(this);
return cmd;};
IDbCommand* IDbConnection::CreateCommand(){return this::CreateCommand();};
......
}
__gc class Comm : public IDbCommand
{
.......
}
I am new to .Net, ADO.Net and i have to programm an independent dataprovider
(no sql, no oledb, no odbc) and in addition it has to be in visual c++
untill now i have two classes.
Class Conn derived from IDbConnection and class comm derived from idbcommand.
so my problem is the method 'Comm* CreateCommand' in class Conn, i allways
get the error message error C2392: ..... : Covariant-Returntype
WTF is that?????
__gc class Comm;
__gc class Conn : public IDbConnection
{
......
Comm* CreateCommand(){Comm* cmd = new Comm();
cmd->set_Connection(this);
return cmd;};
IDbCommand* IDbConnection::CreateCommand(){return this::CreateCommand();};
......
}
__gc class Comm : public IDbCommand
{
.......
}