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
FbConnection.GetSchema("Columns") doesn't correctly identify array-columns [DNET182] #192
Comments
Commented by: jonas högström (jonas.hogstrom) I did some research and found the actual reason for the bug, so I updated the report... |
Modified by: jonas högström (jonas.hogstrom)description: In the Employee database, there is a column in the JOB table declared as
When loading the metadata of the database using FbConnection.GetSchema("Columns"), the last value of the collection is called "IS_ARRAY", but this value is incorrectly returned as false for the LANGUAGE_REQ column. As far as I can see, there is nothing that indicates that the column is an array column, or how big the array is. Also, when looking at the values found in GetSchemaTable from a datareader;
the type returned is "System.Array", but the actual value from the query is a System.String[] => In the Employee database, there is a column in the JOB table declared as
When loading the metadata of the database using FbConnection.GetSchema("Columns"), the last value of the collection is called "IS_ARRAY", but this value is incorrectly returned as false for the LANGUAGE_REQ column. The reason turns out to be an invalid comparison in FirebirdSql.Data.Schema.FbColumns.ProcessResult:
should be:
Also, when looking at the values found in GetSchemaTable from a datareader;
the type returned is "System.Array", but the actual value from the query is a System.String[] |
Modified by: jonas högström (jonas.hogstrom)Version: 2.5.0 Alpha 2 [ 10240 ] |
Modified by: @cincuranetstatus: Open [ 1 ] => In Progress [ 3 ] |
Commented by: @cincuranet The == vs. != is fixed. The datatype returned in SchemaTable is correct. System.String[] is an array of strings, and System.Array is just array of "unknown" type(s). |
Modified by: @cincuranetstatus: In Progress [ 3 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5.0. Alpha 3 [ 10261 ] Fix Version: 2.5.0 [ 10170 ] |
Modified by: @cincuranetFix Version: 2.5.0 [ 10170 ] => |
Submitted by: jonas högström (jonas.hogstrom)
In the Employee database, there is a column in the JOB table declared as
When loading the metadata of the database using FbConnection.GetSchema("Columns"), the last value of the collection is called "IS_ARRAY", but this value is incorrectly returned as false for the LANGUAGE_REQ column.
The reason turns out to be an invalid comparison in FirebirdSql.Data.Schema.FbColumns.ProcessResult:
should be:
Also, when looking at the values found in GetSchemaTable from a datareader;
the type returned is "System.Array", but the actual value from the query is a System.String[]
Commits: 4311892
The text was updated successfully, but these errors were encountered: