mithrandyr / SimplySql

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

Exception calling "Open" with "0" argument(s): "Object cannot be cast from DBNull to other types." #126

Closed computechrr closed 7 months ago

computechrr commented 7 months ago

Exception: C:\Program Files\PowerShell\Modules\SimplySql\1.9.1\Providers\MySql\config.ps1:101:11

using powershell 7.4.1 mariadbserver 11.2 on windows server 2019 Open-MySqlConnection -Server '127.0.0.1' -ConnectionName 'localhost' -port '3306' -Database 'server-inventory' -Credential $mysqlcreds this occurs when running the script the 1st time. if I run it again while it is still open in studio code, it works.

mithrandyr commented 7 months ago

@computechrr -- version 1.9.1 has not been certified for Powershell 7 -- so you might find issues. Version 2, which is almost complete -- will fully support PowerShell 7 + cross platform.

computechrr commented 7 months ago

Thank you, did not realize that 7 wasn’t yet supported.

Thank you

Ted Reichelt

From: Mithrandyr @.> Sent: Wednesday, January 31, 2024 7:07 AM To: mithrandyr/SimplySql @.> Cc: Ted Reichelt @.>; Mention @.> Subject: Re: [mithrandyr/SimplySql] Exception calling "Open" with "0" argument(s): "Object cannot be cast from DBNull to other types." (Issue #126)

@computechrrhttps://github.com/computechrr -- version 1.9.1 has not been certified for Powershell 7 -- so you might find issues. Version 2, which is almost complete -- will fully support PowerShell 7 + cross platform.

— Reply to this email directly, view it on GitHubhttps://github.com/mithrandyr/SimplySql/issues/126#issuecomment-1919172541, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKMYWOGDL3OZQ4S2R3ZFKTDYRJFWZAVCNFSM6AAAAABCTDRISGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJZGE3TENJUGE. You are receiving this because you were mentioned.Message ID: @.**@.>>