MySQL Forums
Forum List  »  Connector/C++

Connector on ATL/COM
Posted by: Thomas Knudsen
Date: April 13, 2009 12:09PM

I'm writting a ATL/COM component that needs to connect to a mysql database. When I run and test the code in a console program everything is fine but when I copy/past the code into my alt code the problems begin. It builts alright in the ATL/COM project but when the client initializes the ATL/COM component I get an error with the description:
Access violation reading location 0xcccccccc.

It's difficult to debug but I'm almost sure the bug is in the code line;

con = driver->connect("tcp://127.0.0.1:3306", "root", "root");

Does anyone have experience with accessing a mysql database from a ATL/COM component? I've been googling this for four days now and I'm still stuck!

In both programs (test and atl) I've sat up the release config:
c++/generel
Additional Include Directories=C:\Program Files\MySQL\MySQL Connector C++ 1.0.4.0\lib\opt,C:\Program Files\MySQL\MySQL Connector C++ 1.0.4.0\include

Linker/generel
Additional Library Directories=C:\Program Files\MySQL\MySQL Connector C++ 1.0.4.0\lib\opt
Linker/Input
Additional dependencies=mysqlcppconn.lib

Let me know if you know anything about this!
Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Connector on ATL/COM
4837
April 13, 2009 12:09PM
2523
April 15, 2009 12:23PM
2764
April 18, 2009 03:28AM
2686
April 19, 2009 02:08PM
2651
May 16, 2009 10:10AM
2530
May 18, 2009 08:56AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.