New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty space after host name in SQL server, cause inconsistent error #57358
Comments
https://stackoverflow.com/a/3523068/23076275 confirms a white space in a hostname is invalid |
yeah, so instead of telling the user this, the inconsistency can help lead them astray. |
Actually, the host is trimmed (trailing/leading spaces removed): https://github.com/qgis/QGIS/blob/master/src/providers/mssql/qgsmssqlnewconnection.cpp#L306 but not when it's written: https://github.com/qgis/QGIS/blob/master/src/providers/mssql/qgsmssqlnewconnection.cpp#L160 I'll fix that. |
What is the bug or the crash?
This is a sneaky mistake that can prevent novice users from using QGIS with MS SQL server, simply by them doing a copy-paste of the host name. Because an empty space can sneak in undeteced, like so; "MyDomainsServer ".
The inconsistency comes when editing the connetion; the buttons "Test connection" and "List databases" works just fine, and you can see the tables in the database. But when you're done editing and go back to press connect. You get this error:
Steps to reproduce the issue
Versions
4.10.3-A Coruña
3.28.8-Firenze
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: