So, it seems that there are two problems: (1) the connection fails (even though it works with pyodbc) and (2) retrieving the diagnostic information after the error hangs with the MS driver. I don't see an obvious reason for either problem, but I have two thoughts.
Does your connection string have any non-ASCII characters? A difference in string conversion is one of the few things I can imagine distinguishing odbc-driver-connect's behavior from pyodbc, since IIUC both just pass the connection string to SQLDriverConnect without any processing. Also, double-check backslashes.
It looks like you're using Racket CS. Could you try the program with Racket BC too? It's possible that there's some difference in the FFI's behavior between the two versions that the db library is not accounting for.
Ryan