Hello there,
This is the source code for the function Test-ODBCConnection which tests if the ODBC connection can connect to the database.
Function Test-ODBCConnection {
[CmdletBinding()]
param(
[Parameter(Mandatory=$True,
HelpMessage="DSN name of ODBC connection")]
[string]$DSN
)
$conn = new-object system.data.odbc.odbcconnection
$conn.connectionstring = "(DSN=$DSN)"
try {
if (($conn.open()) -eq $true) {
$conn.Close()
$true
}
else {
$false
}
} catch {
Write-Host $_.Exception.Message
$false
}
}
Meanwhile, this seems to be a topic that is much related to AWS services, and posting it on their support page might help you in getting this sorted.
--------------------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept it as an answer–