Issue Details (XML | Word | Printable)

Key: DNET-861
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Fabricio Araujo
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.
.NET Data provider

FbConnection.GetSchema getting column information does not bring the column_size on varchar columns

Created: 07/Jan/19 03:19 AM   Updated: 14/Feb/19 08:33 AM
Component/s: ADO.NET Provider
Affects Version/s:,
Fix Version/s:

File Attachments: 1. Zip Archive (251 kB)
2. Zip Archive (1.65 MB)

Visual Studio 2017
NET Standard libraries
Firebird 2.5

 Description  « Hide
I have my own way to generate SQL to use with Dapper (Dapper.Contrib does not fit well
in what I'm doing) and I need to get column information to do so.

When I'm working with database tables directly, all works wonders when I use this call:
DataTable dtb = conn.GetSchema("COLUMNS", new string[] { null, null, ParamTableName });

When I use a view, things gets weird. Views (is not a trivial view, it has a few joins) with varchar columns comes with COLUMN_TYPE correct but COLUMN_SIZE comes NULL.
I traced the executed SQL of GetSchema but while it does not bring the type of the column (only the reference to the domain) it DOES BRING
the COLUMN_SIZE correctly

The other columns comes correctly (all those are INTEGER columns though).

Create the following view on the provided employee.fdb:

WITH CtePhoneList as (
  E.Full_Name ,

  Employee E
  inner join Department d
    on e.Dept_No = d.Dept_No

  Full_Name ,


And build the provided winforms application to get the column info from that view. If you try on the original phone list view, all column will come ok.
If you run the application on THAT view you'll see that varchar columns will come without column size.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.