ret = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &context);
ret = SQLAllocHandle(SQL_HANDLE_DBC, context, &connection);
ret = SQLAllocHandle(SQL_HANDLE_STMT, connection, &cmd);
ret = SQLDriverConnect(connection, NULL, (SQLCHAR *)
"DRIVER=FreeTDS;SERVER=SQLEXPRESS;UID=sa;PWD=test; APP=name of my executable file;WSID=IP of My SQL machine;Port=1433", SQL_NTS, outConnectionString,MAX_OUT_CONNECTION_STRING_LEN, &len,
The first three ret are 0 but the last one is -1.
Your suggestions are great appreciated.