I am using Windows 10, Visual Studio 2015.
Alright so anyways here is my code and I am getting this error:
uninitialized local variable 'driver'
I am just following a tutorial from the main MySQL website (The example) and that seems to happen, so can someone explain why its doing that or tell me a fix. :) I tried to make it static, it let to go through until I clicked the button then I got a invalid write to memory message. Hopefully this is enough for you to tell me whats up.
LRESULT CALLBACK WndProc(...)
{
...
switch (LOWORD(wparam))
{
case SQL_BUTTON_LAUNCH:
using namespace sql;
Driver *driver;
Connection *con;
Statement *stmt;
ResultSet *res;
con = driver->connect("tcp://127.0.0.1:3306", "root", "root");
con->setSchema("test");
stmt = con->createStatement();
res = stmt->executeQuery("SELECT 'Hello World!' AS _message");
delete res;
delete stmt;
delete con;
//SQLConnection();
break;
}
}