![]() |
mySQL + HPB_bot
Well I've been trying to integrate MySQL++ into HPB_bot, thou I've got a major problem. I've succeeded to connect to my SQL database thou any attempt to fetch or insert information results in a crash.
Sample code Code:
mysqlpp::Connection con("test","127.0.0.1","test","test"); I'm guessing I'll haft to make a separate thread, is there a way to get past this obstacle as smooth as possible? |
Re: mySQL + HPB_bot
you should ALWAYS try and catch for SQL Exceptions when using SQL. As the sql command will likely contain syntax errors and the only way to know there is a syntax error is to raise an exception. If the exception is not handled (handled = using try and catch), the program will crash.
see: http://tangentsoft.net/mysql++/doc/u.../tutorial.html |
All times are GMT +2. The time now is 22:23. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.