diff --git a/PSSQLite/Invoke-SqliteQuery.ps1 b/PSSQLite/Invoke-SqliteQuery.ps1 index 83a704f..d796358 100644 --- a/PSSQLite/Invoke-SqliteQuery.ps1 +++ b/PSSQLite/Invoke-SqliteQuery.ps1 @@ -408,8 +408,7 @@ $ConnectionString = "Data Source={0}" -f $Database - $conn = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList $ConnectionString - $conn.ParseViaFramework = $true #Allow UNC paths, thanks to Ray Alex! + $conn = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList $ConnectionString,$true #Allow UNC paths, thanks to Ray Alex! Write-Debug "ConnectionString $ConnectionString" Try diff --git a/PSSQLite/New-SqliteConnection.ps1 b/PSSQLite/New-SqliteConnection.ps1 index 9da0d9d..f85c4f8 100644 --- a/PSSQLite/New-SqliteConnection.ps1 +++ b/PSSQLite/New-SqliteConnection.ps1 @@ -116,8 +116,7 @@ $ConnectionString += "Read Only=True;" } - $conn = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList $ConnectionString - $conn.ParseViaFramework = $true #Allow UNC paths, thanks to Ray Alex! + $conn = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList $ConnectionString,$true #Allow UNC paths, thanks to Ray Alex! Write-Debug "ConnectionString $ConnectionString" if($Open) diff --git a/Tests/Invoke-SQLiteQuery.Tests.ps1 b/Tests/Invoke-SQLiteQuery.Tests.ps1 index 9c9fd9c..780df66 100644 --- a/Tests/Invoke-SQLiteQuery.Tests.ps1 +++ b/Tests/Invoke-SQLiteQuery.Tests.ps1 @@ -52,13 +52,13 @@ Describe "Invoke-SQLiteQuery PS$PSVersion" { It 'should support parameterized queries' { $Out = @( Invoke-SQLiteQuery @Verbose -Database $SQLiteFile -Query "SELECT * FROM NAMES WHERE BirthDate >= @Date" -SqlParameters @{ - Date = (Get-Date 3/13/2012) + Date = (Get-Date -Year 2012 -Month 3 -Day 13) } -ErrorAction Stop ) $Out.count | Should Be 1 $Out[0].fullname | Should Be "Cookie Monster" $Out = @( Invoke-SQLiteQuery @Verbose -Database $SQLiteFile -Query "SELECT * FROM NAMES WHERE BirthDate >= @Date" -SqlParameters @{ - Date = (Get-Date 3/15/2012) + Date = (Get-Date -Year 2012 -Month 3 -Day 15) } -ErrorAction Stop ) $Out.count | Should Be 0 }