Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions PSSQLite/Invoke-SqliteQuery.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions PSSQLite/New-SqliteConnection.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Tests/Invoke-SQLiteQuery.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down