Hi guys when I use the method connect my program to MYSQL it crashes for some reason and I am wondering if any of you have any ideas? loc, usr,pass are all c++ strings
driver = get_driver_instance(); con = driver->connect(loc,usr,pass);//crashes here con->setSchema("accountDB"); isConnectedDB=1;
There is no way to answer that without more information. What type is driver and how does the interface of connect look like. And it could be life time issues depending on what connect does with the parameters. So you would need to post some more code that shows the whole function. And also, what is the crash you get, whats the error code?
It just sorta works now, the problem is that I was entering the wrong password and the debugger wouldnt go to the catch block but now it works and if you enter the wrong password in my UI in my program it will flash with a red warning saying that it failed to connect.