Support #6043
closedMSSQL server connection string
0%
Description
Hi,
thank you for the implementation of the MSSQL server backend and wt4 in general. I have a few minor remarks to the connect function implementation/documentation.
In the connect function from the MSSQL server backend (MSSQLServer.C line 154)
would it be possible to change the last parameter of the function SQLDriverConnectW from SQL_DRIVER_COMPLETE to SQL_DRIVER_NOPROMPT to support better error diagnostics?
Or would there be any drawback?
Because in the current version if the connection string is wrong the only feedback is:
[Error] [Microsoft][ODBC Driver 13 for SQL Server]Dialog failed.
With the noprompt version one would receive for example:
[Error] [Microsoft][ODBC Driver 13 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [2].
or
[Error] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Login failed for user 'username'.
Further in the doxygen documentation the connection string example should be adjusted. According to the linked msdn documentation User should be replaced by uid and Password should be replaced by pwd.
For example a complete connection string for a sqlexpress instance should look like:
"Driver={ODBC Driver 13 for SQL Server};Server=.\\sqlexpress;uid=username;pwd={password};database=dbname;"
Best regards,
Max
Updated by Koen Deforche over 7 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
Updated by Roel Standaert over 7 years ago
- Status changed from InProgress to Resolved
I agree that NOPROMPT
is probably better, and I fixed the connection string in the documentation.
Updated by Roel Standaert over 7 years ago
- Status changed from Resolved to Closed