DataAction / AdoNetCore.AseClient

AdoNetCore.AseClient - a .NET Core DB Provider for SAP ASE
Apache License 2.0
108 stars 45 forks source link

AnsiStringFixedLength output parameter null #33

Closed senseibaka closed 6 years ago

senseibaka commented 6 years ago

When executing a stored procedure with a parameter with the following properties:

p.DbType = DbType.AnsiStringFixedLength;
p.Direction = ParameterDirection.Output;

After execution, p.Value is null, even when the procedure sets the value.

The workaround is to specify p.Size = some_appropriate_value;


The SAP driver does not experience this issue. Judging by the output of Ribo, the SAP driver sets Size to 255, regardless of what the user dictates:

Status [1]:                 PARAM_RETURN (0x01)
User Type [4]:              0
Data Type [1]:              CHAR
Length [1]:                 255

By comparison, we send:

Status [1]:                 PARAM_RETURN (0x01)
User Type [4]:              0
Data Type [1]:              VARCHAR
Length [1]:                 0