Home » Developer & Programmer » Precompilers, OCI & OCCI » problem in work with OCCI objects from my VS6 project
icon9.gif  problem in work with OCCI objects from my VS6 project [message #115705] Wed, 13 April 2005 13:58 Go to next message
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
Re: problem in work with OCCI objects from my VS6 project [message #115823 is a reply to message #115705] Thu, 14 April 2005 10:15 Go to previous messageGo to next message
Michael Hartley
Messages: 110
Registered: December 2004
Location: West Yorkshire, United Ki...
Senior Member

Hi,

It's not entirely clear what your problem is from the small amount of code you have supplied.

Will you post the entire code file (.cpp) to the forum, then we can perform some tests and form an opinion.

Michael Hartley
http://www.openfieldsolutions.co.uk
Re: problem in work with OCCI objects from my VS6 project [message #115850 is a reply to message #115823] Thu, 14 April 2005 13:32 Go to previous messageGo to next message
just-in
Messages: 5
Registered: April 2005
Location: russia
Junior Member

Hi Michael. Thank you for help. I have two VS6-projects: first-in console mode(it works) and second - in graphical mode(the same code in button1() func but doesn't work). Also I attach files: with libs, includes and dll. I'll be waiting with pleasure your opinion
  • Attachment: attach.rar
    (Size: 803.55KB, Downloaded 474 times)
icon6.gif  Re: problem in work with OCCI objects from my VS6 project [message #116341 is a reply to message #115850] Tue, 19 April 2005 10:12 Go to previous message
just-in
Messages: 5
Registered: April 2005
Location: russia
Junior Member

WOW, I resolved this problem. It didn't work cause my preprocessor directives spoiled compiling. I simply made my not working function a global function and it really works.
Previous Topic: Who can give me a makefile ?
Next Topic: Object as OUT parameter
Goto Forum:
  


Current Time: Fri Aug 14 09:55:36 CDT 2020