Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataReader.GetFieldType(24) returned null #9

Closed
tresf opened this issue Jul 19, 2018 · 1 comment
Closed

DataReader.GetFieldType(24) returned null #9

tresf opened this issue Jul 19, 2018 · 1 comment

Comments

@tresf
Copy link
Owner

tresf commented Jul 19, 2018

When running the project against SQL Server 2017 instance:

Exception calling "Fill" with "1" argument(s): "DataReader.GetFieldType(24) returned null."
At GetMsSqlDump.ps1:287 char:5
+     $adapter.Fill($ds) | Out-Null
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : InvalidOperationException

Similar article here and the proposed fix is to add C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies\Microsoft.SqlServer.Types.dll to the assembly, but I'm not sure how to do this with PowerShell.

@tresf
Copy link
Owner Author

tresf commented Jul 19, 2018

On my machine, this was fixed by installing the SQLSysClrTypes.msi package from SQL Server 2016 and restarting powershell.

@tresf tresf closed this as completed Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant