DataReader.GetFieldType returned null
Reference the Microsoft.SQLServer.Types dll from the project and for the reference set it as "Copy Local" in the properties of the reference. This will package that DLL up with the website when you deploy it. Then you don't need all of SQL Server installed on your web box in order to use the SQL Server data types. I did this for my website because it was using the geography
data type columns and I was getting the same error.
Receiving DataReader.GetFieldType returned null. error.
I was able to finally get this working by adding a reference to
C:\Program Files (x86)\Microsoft SQL Server\110\Shared\Microsoft.SqlServer.Types.dll
and setting Copy Local to true. Odd that the nuget package worked for me in a different project, but not this one. Anyway, hope this helps somebody!
SqlServer Spatial DataReader.GetFieldType returned null
The nuget package Microsoft.SqlServer.Types is only for c# projects.
You can modify the class to be compatible with vb.net projects.
Install support into your project using:
Install-Package Microsoft.SqlServer.Types
Locate the following file:
/SqlServerTypes/Loader.cs
Convert the code in Loader.cs to vb (you can do this with an online converter) and save the file as: Loader.vb
Now you will be able to access the SqlServerTypes namespace from your project.
DataReader.GetFieldType(30) returned null
I already solve the issue.
The reference of Microsoft.SqlServer.Types should be on GAC
Plus, putting information in web.config
That fixed my problem
Related Topics
Have Pl/Sql Outputs in Real Time
Why Aren't Nulls Counted in Count(Columnname)
How to Alter a Column Datatype for Derby Database
Add Non-Nullable Columns to an Existing Table in SQL Server
Good Embedded Database Solution (Like Sqlite) for .Net
Replacing Text in a Blob Column
Querying Multiple Tables in Big Query
How to Deal with Spark Udf Input/Output of Primitive Nullable Type
Database View Does Not Reflect The Data in The Underying Table
Round Date to 10 Minutes Interval
Sql Query Not Between Two Dates
Creating Trigger That Runs on Two Tables
How to Group by and Concatenate Fields in Redshift
How to Check If a Directory Exists Using SQL Server
Adding a Non-Nullable Column to Existing Table Fails. Is The "Value" Attribute Being Ignored
How to Get Just The First Row in a Result Set After Ordering