Skip to content

DataReader returned null when using MS SQL geography #753

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

Open
Franklin89 opened this issue May 4, 2025 · 1 comment
Open

DataReader returned null when using MS SQL geography #753

Franklin89 opened this issue May 4, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@Franklin89
Copy link

Describe the bug
When choosing a table from my MS SQL Datasource an error occurs: DataReader.GetFieldType(13) returned null. Looking at that column in my database I see that it is a geography column. I suppose that is not support. It would be nice to still import that column

Stacktrace
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: DataReader.GetFieldType(13) returned null.
at System.Data.ProviderBase.SchemaMapping.SetupSchemaWithKeyInfo(MissingMappingAction mappingAction, MissingSchemaAction schemaAction, Boolean gettingData, DataColumn parentChapterColumn, Object chapterValue)
at System.Data.ProviderBase.SchemaMapping..ctor(DataAdapter adapter, DataSet dataset, DataTable datatable, DataReaderContainer dataReader, Boolean keyInfo, SchemaType schemaType, String sourceTableName, Boolean gettingData, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.FillSchemaFromReader(DataSet dataset, DataTable datatable, SchemaType schemaType, String srcTable, IDataReader dataReader)
at System.Data.Common.DataAdapter.FillSchema(DataTable dataTable, SchemaType schemaType, IDataReader dataReader)
at System.Data.Common.DbDataAdapter.FillSchemaInternal(DataSet dataset, DataTable datatable, SchemaType schemaType, IDbCommand command, String srcTable, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillSchema(DataTable dataTable, SchemaType schemaType, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillSchema(DataTable dataTable, SchemaType schemaType)
at FastReport.Data.DataConnectionBase.FillTableSchema(DataTable table, String selectCommand, CommandParameterCollection parameters)
at FastReport.Data.TableDataSource.InitSchema()
at FastReport.FastQueryBuilder.Table.get_FieldList()
at FastReport.FastQueryBuilder.TableView.set_Table(Table value)
at FastReport.FastQueryBuilder.Workspace.DoAddTable(Table table, Point position)
at FastReport.FastQueryBuilder.Core.OnAddTable(Object sender, AddTableEventArgs e)
at System.Windows.Forms.Control.OnDoubleClick(EventArgs e)
at System.Windows.Forms.ListBox.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@Franklin89 Franklin89 added the bug Something isn't working label May 4, 2025
@BogdanStegachev
Copy link

Hello!

Thank you for your request!

Reproduced this behaviour, created a task and passed it to the development department, expect changes in the next versions of FastReport FastReport Community Edition

Best regards,
Bogdan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants