First I used SQLConnect to connect to the ODBC driver which fine, however I discovered that I need to enable UNICODE in my app so I have set the UNICODE flag in the preprocessor definitions which calls SQLConnectW, my problem is that SQLConnectW fails to connect and returns -1.
I have no idea what's wrong and why SQLConnect works and SQLConnectW doesn't