Closed mithrandyr closed 8 months ago
#create some Json object $json = Get-ChildItem | ConvertTo-Json -Depth 2 Open-SqlConnection Invoke-SqlUpdate -Query "CREATE TABLE #test (val AS varchar(max))" #this line will fail Invoke-SQLUpdate -Query "INSERT INTO #test (val) VALUES (@val)" -Parameters @{val = $json} #this one will succeed Invoke-SQLUpdate -Query "INSERT INTO #test (val) VALUES (@val)" -Parameters @{val = $json.ToString()}
Resolved in version 2.0.2