Description
First of all, thank you for DBCode. We appreciate the plugin very much. Here is a small issue we ran into.
When I create a new Microsoft SQL Server connection, the Database field accepts typed text. If I type the database name by hand, the connection fails. It only works if I pick the database from the dropdown, or load the list with sync/refresh and then pick it.
The field accepts free text, so a typed name that matches an existing database should work the same as one picked from the list.
Steps to reproduce
Open DBCode and add a new connection.
Choose Microsoft SQL Server as the connection type.
Enter the server, authentication and credentials.
Type an existing database name into the Database field by hand (for example MyDatabase). Don't pick it from the dropdown.
Save or connect.
Expected behavior
DBCode connects to the typed database, just as it does when the same name is picked from the dropdown.
Actual behavior
The connection fails. If I open the same connection, pick the same database from the dropdown (after syncing the list if needed) and save, it connects without problems.
Error message
Login failed for %user_name%
Workaround
Don't type the database name. Load the list with sync/refresh and pick the database from the dropdown.
Possible cause (assumption)
The dropdown selection may set a different internal value than the text field, or add one alongside it (for example a database ID or a separate property). A typed name may never reach the connection string. If typed text isn't meant to be supported, the field should be select-only, or show a validation hint.
Environment
DBCode version: 1.38.6
VS Code version: Latest
OS: Windows 11 Enterprise
SQL Server version: Microsoft SQL Server 2019
Authentication type: SQL
Description
First of all, thank you for DBCode. We appreciate the plugin very much. Here is a small issue we ran into.
When I create a new Microsoft SQL Server connection, the Database field accepts typed text. If I type the database name by hand, the connection fails. It only works if I pick the database from the dropdown, or load the list with sync/refresh and then pick it.
The field accepts free text, so a typed name that matches an existing database should work the same as one picked from the list.
Steps to reproduce
Open DBCode and add a new connection.
Choose Microsoft SQL Server as the connection type.
Enter the server, authentication and credentials.
Type an existing database name into the Database field by hand (for example MyDatabase). Don't pick it from the dropdown.
Save or connect.
Expected behavior
DBCode connects to the typed database, just as it does when the same name is picked from the dropdown.
Actual behavior
The connection fails. If I open the same connection, pick the same database from the dropdown (after syncing the list if needed) and save, it connects without problems.
Error message
Login failed for %user_name%
Workaround
Don't type the database name. Load the list with sync/refresh and pick the database from the dropdown.
Possible cause (assumption)
The dropdown selection may set a different internal value than the text field, or add one alongside it (for example a database ID or a separate property). A typed name may never reach the connection string. If typed text isn't meant to be supported, the field should be select-only, or show a validation hint.
Environment
DBCode version: 1.38.6
VS Code version: Latest
OS: Windows 11 Enterprise
SQL Server version: Microsoft SQL Server 2019
Authentication type: SQL