locked
New-Object : Cannot find type [System.Data.Table]: RRS feed

  • Question

  • I trying to execute and SQL statement, however I'm getting the error below:

    New-Object : Cannot find type [System.Data.Table]: verify that the assembly
    [ERROR] containing this type is loaded.

    How do I resolve this error?

    Thanks

    Wednesday, October 25, 2017 9:28 PM

Answers

  • Also in ISE and WMF 5 we can do this:


    \_(ツ)_/


    • Edited by jrv Wednesday, October 25, 2017 9:42 PM
    • Marked as answer by Louisb Wednesday, October 25, 2017 10:18 PM
    Wednesday, October 25, 2017 9:40 PM

All replies

  • No such type in Windows.  Maybe you mean [System.Data.DataTable]?

    \_(ツ)_/

    Wednesday, October 25, 2017 9:33 PM
  • To find loaded type use autocomplete:

    [System.Data.<tab><tab> ...

    THis will display all available types for a namespace.

    Take time to learn PowerShell and you will know about how to use the features of PowerShell.


    \_(ツ)_/

    Wednesday, October 25, 2017 9:35 PM
  • In ISE you will see this:


    \_(ツ)_/

    Wednesday, October 25, 2017 9:38 PM
  • Also in ISE and WMF 5 we can do this:


    \_(ツ)_/


    • Edited by jrv Wednesday, October 25, 2017 9:42 PM
    • Marked as answer by Louisb Wednesday, October 25, 2017 10:18 PM
    Wednesday, October 25, 2017 9:40 PM