PoshCode Archive  Artifact [d3375f3cd1]

Artifact d3375f3cd114f1f45af94b3128979e9a5b882b967129057d6c5723bc5b8ec4af:

  • File Invoke-Sqlcmd2-Cannot-process-argument-.ps1 — part of check-in [d138c8f7e8] at 2018-06-10 13:37:22 on branch trunk — Invoke-Sqlcmd2 : Cannot process argument transformation on parameter ‘ConnectionString’. Cannot convert the “System.Col (user: unknown size: 1272)

# encoding: ascii
# api: powershell
# title: 
# description: Invoke-Sqlcmd2 : Cannot process argument transformation on parameter ‘ConnectionString’. Cannot convert the “System.Col
# version: 0.1
# license: CC0
# x-poshcode-id: 4138
# x-archived: 2013-05-07T07:47:13
#
# lections.Hashtable” value of type “System.Collections.Hashtable” to type “System.Data.SqlClient.SqlConnectionStringBuil
# der”.
# At C:\Users\1\Desktop\1.ps1:64 char:39
# +       Invoke-Sqlcmd2 -ConnectionString <<<<  $Connection -Query $Query
# + CategoryInfo          : InvalidData: (:) [Invoke-Sqlcmd2], ParameterBindin…mationException
# + FullyQualifiedErrorId : ParameterArgumentTransformationError,Invoke-Sqlcmd2
#
Invoke-Sqlcmd2 : Cannot process argument transformation on parameter 'ConnectionString'. Cannot convert the "System.Col
lections.Hashtable" value of type "System.Collections.Hashtable" to type "System.Data.SqlClient.SqlConnectionStringBuil
der".
At C:\Users\1\Desktop\1.ps1:64 char:39
+       Invoke-Sqlcmd2 -ConnectionString <<<<  $Connection -Query $Query
    + CategoryInfo          : InvalidData: (:) [Invoke-Sqlcmd2], ParameterBindin...mationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Invoke-Sqlcmd2