Bugs
Search the entire project
This project's trackers
This project's forums
This project's tasks
This project's releases
This project's documents
This project's news
Project
People
Skill
Advanced search
Log In
|
New Account
Home
My Page
Projects
Code Snippets
Project Openings
Npgsql .Net Data Provider for Postgresql
Summary
Activity
Forums
Tracker
Lists
Tasks
Docs
Surveys
News
SCM
Files
[#1011287] Column Ordinal offset bug in the NpgsqlDataReader GetSchemaTable method
View Trackers
|
Bugs
|
Download .csv
|
Monitor
Date:
2012-12-05 06:05
Priority:
3
State:
Open
Submitted by:
Richard Meyer (
meyerrj
)
Assigned to:
Nobody (None)
Npgsql Version:
2.0.12beta
Category:
None
Group:
None
Resolution:
None
Summary:
Column Ordinal offset bug in the NpgsqlDataReader GetSchemaTable method
Detailed description
In working on a custom data access layer with a colleague, we discovered an issue where the column ordinal values are incremented by 1 when going from the DataReader to the DataTable objects.
Lines 515 and 607 of Ngpgsql.NpgsqlDataReader are the culprits in version 2.0.12.
Per the MSDN specifications, ColumnOrdinal is a zero-based index:
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.getschematable.aspx
Attached is a patched version of NgpgsqlDataReader.cs that removes the + 1.
Followup
No Followups Have Been Posted
Attached Files:
Attachments:
NpgsqlDataReader.cs
Changes:
Field
Old Value
Date
By
File Added
784: NpgsqlDataReader.cs
2012-12-05 06:05
meyerrj