cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

Help! How to create a external sql connection? [Solved]

Anonymous
Not applicable
Hi all, im still new to ArchiCAD API so would like to ask for some help, a thank you in advance! Currently we trying to select data from our online MySQL server for our addon, was looking into odbc connection but sadly we can't find much information on how to create the connection to external sql server.
4 REPLIES 4

ReignBough
Booster
I am currently using MySQL C++ Connector 1.1.3 to connect to external database.
~ReignBough~
ARCHICAD 24 INT 4018 FULL (from AC18)
Windows 10 Pro, Intel Core i7-4790 CPU @ 3.60GHz, 32.0GB RAM, 64-bit OS

Anonymous
Not applicable
Thanks for the reply ReignBough.

I have tried using MySQL C++ Connector 1.1.3 but without much success yet. I included all the MySQL header and .lib files in my Visual Studio project Src folder, as well as including the BOOST C++ library( required by the MySQL connector ). While it compiled perfectly, when I test it with the AddOnTool it just gives the error "Undefined Release". I think it may have to do with the MySQL .lib or BOOST files not being included into ArchiCAD correctly?

ReignBough
Booster
Here's what I did:
  • Open project property.
  • Add include directory of MySQL Connector to Configuration Properties > C/C++ > General > Additional Include Directories.
  • Add lib/opt directory of MySQL Connector to Configuration Properties > Linker > General > Additional Library Directories for release mode.
  • Add mysqlcppconn.lib to Configuration Properties > Linker > Input > Additional Dependencies for release mode. NOTE: Their documentation says that you should also include libmysql.lib but it is not found on the said directory.
  • Also, you need to install BOOST and add its main folder to Additional Include Directories.
~ReignBough~
ARCHICAD 24 INT 4018 FULL (from AC18)
Windows 10 Pro, Intel Core i7-4790 CPU @ 3.60GHz, 32.0GB RAM, 64-bit OS

Anonymous
Not applicable
Thanks ReignBough we've got it working.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!