problem in work with OCCI objects from my VS6 project [message #115705] |
Wed, 13 April 2005 13:58  |
just-in
Messages: 5 Registered: April 2005 Location: russia
|
Junior Member |

|
|
May be I have common problem with cpp, but I cant't resolve it.
1. Create project with help of MFCAppWizard(Dialog Based)
2. There i attach my .h and .src files
3. from OnButton1() func Create connection to DB
ConnectionPool *connPool;
connPool = env->createConnectionPool (poolUserName, poolPassword, connectString, minConn, maxConn, incrConn);
Connection *con;
con = connPool->createConnection (username, passWord);
4. And try to create object:
MyComp *comp1=new (con,"COMPS") MyComp("20 Herz");
struct of MyComp I get from #include "mappings.h"
5. After compiling I have an error:
C:\test\myTree\myTreeDlg.cpp(274) : error C2061: syntax error : identifier 'con'
C:\test\myTree\myTreeDlg.cpp(295) : error C2143: syntax error : missing ';' before '}'
C:\test\myTree\myTreeDlg.cpp(295) : error C2143: syntax error : missing ';' before '}'
C:\test\myTree\myTreeDlg.cpp(295) : error C2143: syntax error : missing ';' before '}'
C:\test\myTree\myTreeDlg.cpp(295) : error C2143: syntax error : missing ';' before '}'
And so on.........
If you can understand what's happend, please help me
p.s. con->commit(); does't make any errors
|
|
|
|
|
|