mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.45k stars 292 forks source link

Error Message on Database Connect: "Cannot read property 'localeCompare' of undefined" #758

Open JGoldz75 opened 3 years ago

JGoldz75 commented 3 years ago

Trying to connect to a Microsoft SQL Server that uses integrated AD security. My connection string looks like this: "server=MYSERVERHERE;database=MYDATABASEHERE;Integrated Security=true;User ID=MYDOMAIN\MYUSERNAME;Password=MYPASSWORD"

Additionally, here is my JSON Syntax: { "mssqlOptions": { "appName": "SQLTools", "useUTC": false, "encrypt": true }, "previewLimit": 50, "server": "localhost", "port": 1433, "driver": "MSSQL", "name": "TestMyDatabase", "connectString": "server=MYSERVERHERE;database=MYDATABASEHERE;Integrated Security=true;User ID=MYDOMAIN\MYUSERNAME;Password=MYPASSWORD", "password": "" }

Clicking "Test Connection" works, and gives the message that the connection was successful.

However, clicking "Save Connection" presents the error message "Request connection/GetConnectionsRequest failed with message: Cannot read property 'localeCompare' of undefined"

I am a bit of a database and VS Code novice. Anyone have any ideas on how to fix? Is this a non-issue?

fzhem commented 2 months ago

The mssql sqltools uses tedious to connect to the sql server database which does not currently support integrated security.

If you want to, you can use a fork of the mssql tools that has Integrated Security auth.