Closed whoisbruce closed 4 months ago
The last two lines read PS C:> New-DbaSqlParameter -SqlDbType structured -Value $inparamAsDataTable -TypeName 'dbatools_tabletype' PS C:> Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $inparamAsDataTable
I think it should be more like PS C:> $inparamAsSQLParameter = New-DbaSqlParameter -SqlDbType structured -Value $inparamAsDataTable -TypeName 'dbatools_tabletype' PS C:> Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query myproc -SqlParameter $inparamAsSQLParameter_
hey @whoisbruce , thanks for the report. There's another pending PR on invoke-dbaquery so as soon as that is merged I'll push a new PR to fix the documentation issue.
The last two lines read PS C:> New-DbaSqlParameter -SqlDbType structured -Value $inparamAsDataTable -TypeName 'dbatools_tabletype' PS C:> Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query my_proc -SqlParameter $inparamAsDataTable
I think it should be more like PS C:> $inparamAsSQLParameter = New-DbaSqlParameter -SqlDbType structured -Value $inparamAsDataTable -TypeName 'dbatools_tabletype' PS C:> Invoke-DbaQuery -SqlInstance localhost -Database master -CommandType StoredProcedure -Query myproc -SqlParameter $inparamAsSQLParameter_