anonymoosed
Getting the hang of it
I am not sure what is wrong. LPR downloader is working, I also know the connection string is correct I verified with this script
# Define the connection string
$connectionString = "Data Source=.\SQLEXPRESS;Initial Catalog=LPR;Persist Security Info=True;Integrated Security=true"
# Create a new instance of SqlConnection
$connection = New-Object System.Data.SqlClient.SqlConnection $connectionString
try {
# Attempt to open the connection
$connection.Open()
# If the connection state is Open, the test is successful
if ($connection.State -eq "Open") {
Write-Host "Connection test successful."
}
}
catch {
# Catch and display exception if the connection fails
Write-Error "Connection test failed: $_"
}
# Ensure the connection is closed if it was opened, within the try or catch block as needed
if ($connection.State -eq "Open") {
$connection.Close()
}
# Define the connection string
$connectionString = "Data Source=.\SQLEXPRESS;Initial Catalog=LPR;Persist Security Info=True;Integrated Security=true"
# Create a new instance of SqlConnection
$connection = New-Object System.Data.SqlClient.SqlConnection $connectionString
try {
# Attempt to open the connection
$connection.Open()
# If the connection state is Open, the test is successful
if ($connection.State -eq "Open") {
Write-Host "Connection test successful."
}
}
catch {
# Catch and display exception if the connection fails
Write-Error "Connection test failed: $_"
}
# Ensure the connection is closed if it was opened, within the try or catch block as needed
if ($connection.State -eq "Open") {
$connection.Close()
}