Bug in SQLDriverConnect

Discussion created by hinto on Mar 9, 2017
Latest reply on Mar 22, 2017 by hinto

Given: an ODBC Source defined in the ODBC Manager name "My Filemaker ODBC", a Filemaker Pro file named Data, shared ODBC with everyone


SQLHWND hwndForDriverPrompt = getSQLHWND(hdbc);

SQLTCHAR szConnStrIn[512] = { 0 };

SQLTCHAR szConnStrOut[512] = { 0 };


SWORD cbConnStrIn = 0;

SWORD cbConnStrOutMax = 510;

SWORD cbConnStrOut = 0;

int retcode = SQLDriverConnect(hdbc, hwndForDriverPrompt, szConnStrIn, cbConnStrIn,

szConnStrOut, cbConnStrOutMax, &cbConnStrOut, fDriverCompletion);


When this method is successful (retcode == 0) cbConnStrOut is:




when it should be:


Description=;Database=Data;Server=localhost;Port=;UseLongVarchar=;AutoDetectEncoding=;MultiByteEncoding=;QueryLog_On=;QueryLogTime=;QueryLogFile=;UID=Admin;PWD=admin;DSN=My Filemaker ODBC;


Note the missing DSN parameter in the first DSN


The SQLDriverConnect specification (ODBC1.0) says:


"After a connection is established, SQLDriverConnect returns the completed connection string. The application can use this string for subsequent connection requests. For more information"


Filemaker's ODBC Driver is the only driver that is missing the DSN parameter in szConnStrOut when the method is used