Description:
Hi,
SQLDriverConnect is successful with 3.51.12 connector by using a connection string
Driver={MySQL ODBC 3.51 Driver}; Server=<host>; Port=<port>; UID=<user>; PWD=<password>; DATABASE=<database>"
But it is not possible to connect with SQLDriverConnect by using a connection string
Driver={MySQL Connector/ODBC v5}; Server=<host>; Port=<port>; UID=<user>; PWD=<password>; DATABASE=<database>"
How to repeat:
SQLHENV henv;
SQLHDBC conHandle;
SQLAllocEnv( &henv );
SQLAllocConnect( henv, &conHandle );
std::string connectionString = "Driver=";
connectionString += "{MySQL Connector/ODBC v5}";
connectionString += "; Server=";
connectionString += "<host>";
connectionString += "; Port=";
connectionString += "<port>";
connectionString += "; UID=";
connectionString += "<user>";
connectionString += "; PWD=";
connectionString += "<password>";
connectionString += "; DATABASE=";
connectionString += "<database>";
SQLCHAR inbuf[1024], outbuf[1024];
SQLSMALLINT outbuflen = 0;
memset(inbuf, 0, 1024);
strncpy((char*)inbuf, connectionString.c_str(), 1023);
rc = SQLDriverConnect(conHandle, NULL,
inbuf, SQL_NTS,
outbuf, 1024, &outbuflen,
SQL_DRIVER_NOPROMPT);
Description: Hi, SQLDriverConnect is successful with 3.51.12 connector by using a connection string Driver={MySQL ODBC 3.51 Driver}; Server=<host>; Port=<port>; UID=<user>; PWD=<password>; DATABASE=<database>" But it is not possible to connect with SQLDriverConnect by using a connection string Driver={MySQL Connector/ODBC v5}; Server=<host>; Port=<port>; UID=<user>; PWD=<password>; DATABASE=<database>" How to repeat: SQLHENV henv; SQLHDBC conHandle; SQLAllocEnv( &henv ); SQLAllocConnect( henv, &conHandle ); std::string connectionString = "Driver="; connectionString += "{MySQL Connector/ODBC v5}"; connectionString += "; Server="; connectionString += "<host>"; connectionString += "; Port="; connectionString += "<port>"; connectionString += "; UID="; connectionString += "<user>"; connectionString += "; PWD="; connectionString += "<password>"; connectionString += "; DATABASE="; connectionString += "<database>"; SQLCHAR inbuf[1024], outbuf[1024]; SQLSMALLINT outbuflen = 0; memset(inbuf, 0, 1024); strncpy((char*)inbuf, connectionString.c_str(), 1023); rc = SQLDriverConnect(conHandle, NULL, inbuf, SQL_NTS, outbuf, 1024, &outbuflen, SQL_DRIVER_NOPROMPT);