mithrandyr / SimplySql

PowerShell module for querying various SQL databases
MIT License
197 stars 31 forks source link

Error when using in VSCode: Cannot validate argument on parameter 'ConnectionName'. The argument is null or empty. #159

Closed dpo007 closed 2 months ago

dpo007 commented 2 months ago

Open-MySqlConnection -server $DBServer -ConnectionName 'AnyNameOrNothing' -database $DBname -Credential $userCred

Results in:

Cannot validate argument on parameter 'ConnectionName'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

I get the same error if I omit the "ConnectionName" argument completely, even though the docs say it will default to "default".

The odd part is this only seems to be a problem within VSCode. If I run the same command directly in the PS7 console, it works fine.

PowerShell 7.4.3 Module version: 2.0.4.75 VSCode version: 1.91.0

dpo007 commented 2 months ago

nevermind, my bad. :)