Issue Details (XML | Word | Printable)

Key: DNET-335
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jiri Cincura
Reporter: Alexander Muylaert
Votes: 0
Watchers: 0
Operations

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

The nullable flag of a stored procedure parameter seems to be wrong

Created: 25/Jul/10 06:16 PM   Updated: 25/May/16 07:18 AM
Component/s: ADO.NET Provider
Affects Version/s: 2.5.2
Fix Version/s: 5.1.0.0

File Attachments: 1. XML File test.xml (5 kB)



 Description  « Hide
Hi Jiri

I was having an argument with the guys from llblgenpro. They said that there is no way to know if a stored procedure parameter is nullable or not. I disagreed, since in firebird this seems to work. I tried proving them wrong.

I made a stored procedure that contains all possible declarations of a parameter to me.

create procedure SMURF (
  IN_NULLABLE_BOOL D_BOOL,
  IN_NOT_NULLABLE_BOOL D_BOOL_NN,
  IN_NULLABLE_BOOL2 type of D_BOOL,
  IN_NOT_NULLABLE_BOOL2 type of D_BOOL_NN,
  IN_NULLABLE_BOOL3 smallint,
  IN_NOT_NULLABLE_BOOL3 smallint not null,
  IN_NULLABLE_BOOL4 type of column T_PRODUCT_STOCK.F_PRS_STRICT,
  IN_NOT_NULLABLE_BOOL4 type of column T_PRODUCT_STOCK.F_PRS_ACTIVE)
as
begin
  /* Procedure Text */
  suspend;
end

and then I asked for the schema information.

        var parametersInStoredProcedure = connection.GetSchema("ProcedureParameters", new[] { null, null, "SMURF" });
        parametersInStoredProcedure.WriteXml(@"c:\test.xml");

Attached you'll find the test.xml. It looks to me that the syntax used for IN_NOT_NULLABLE_BOOL3 doesn't return the correct flag for IsNullable.

  <ProcedureParameters>
    <PROCEDURE_NAME>SMURF</PROCEDURE_NAME>
    <PARAMETER_NAME>IN_NOT_NULLABLE_BOOL3</PARAMETER_NAME>
    <PARAMETER_DATA_TYPE>smallint</PARAMETER_DATA_TYPE>
    <PARAMETER_SUB_TYPE>0</PARAMETER_SUB_TYPE>
    <ORDINAL_POSITION>5</ORDINAL_POSITION>
    <PARAMETER_DIRECTION>1</PARAMETER_DIRECTION>
    <PARAMETER_SIZE>2</PARAMETER_SIZE>
    <NUMERIC_PRECISION>0</NUMERIC_PRECISION>
    <NUMERIC_SCALE>0</NUMERIC_SCALE>
    <CHARACTER_OCTET_LENGTH>0</CHARACTER_OCTET_LENGTH>
    <IS_NULLABLE>true</IS_NULLABLE>
  </ProcedureParameters>

is this something fixable?

Thanks

Alexander


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Muylaert made changes - 25/Jul/10 06:26 PM
Field Original Value New Value
Attachment test.xml [ 11690 ]
Jiri Cincura made changes - 25/May/16 06:16 AM
Status Open [ 1 ] In Progress [ 3 ]
Jiri Cincura made changes - 25/May/16 07:18 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Fix Version/s vNext [ 10761 ]
Resolution Fixed [ 1 ]