Bug 43147 - SqlDataReader can't handle stored procedure parameter timestamp OUTPUT
Summary: SqlDataReader can't handle stored procedure parameter timestamp OUTPUT
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data (show other bugs)
Version: 4.5.X
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-06 17:25 UTC by Tiago Freitas Leal
Modified: 2017-09-01 09:29 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
POCO object class (1.24 KB, text/plain)
2016-08-06 17:25 UTC, Tiago Freitas Leal
Details
Stored Procedure (783 bytes, text/x-csrc)
2016-08-06 17:30 UTC, Tiago Freitas Leal
Details

Description Tiago Freitas Leal 2016-08-06 17:25:57 UTC
Created attachment 16929 [details]
POCO object class

I have a table Buyers with columns
Id int,
Name nvarchar(50),
BuyerRowVersion timestamp

I have a POCO object with properties
public int Id { get; set; }
public string Name { get; set; }
public byte[] BuyerRowVersion { get; set; }

When I create a row in the DB, everything runs ok under .NET but on Mono it throws

Unhandled Exception:
System.NotSupportedException: Unknown Type : timestamp
  at Mono.Data.Tds.TdsMetaParameter.GetMetaType () <0x3c74a90 + 0x0057b> in <filename unknown>:0
  at Mono.Data.Tds.Protocol.Tds70.WriteParameterInfo (Mono.Data.Tds.TdsMetaParameter param) <0x3c72dd0 + 0x000a3> in <filename unknown>:0
  at Mono.Data.Tds.Protocol.Tds70.WriteRpcParameterInfo (Mono.Data.Tds.TdsMetaParameterCollection parameters) <0x3c72b28 + 0x00177> in <filename unknown>:0
  at Mono.Data.Tds.Protocol.Tds70.ExecRPC (System.String rpcName, Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean wantResults) <0x3c729a0 + 0x00083> in <filename unknown>:0
  at Mono.Data.Tds.Protocol.Tds70.ExecProc (System.String commandText, Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean wantResults) <0x3c72940 + 0x00052> in <filename unknown>:0
  at System.Data.SqlClient.SqlCommand.Execute (Boolean wantResults) <0x3c71ee8 + 0x0045b> in <filename unknown>:0
  at System.Data.SqlClient.SqlCommand.ExecuteNonQuery () <0x3c71898 + 0x00047> in <filename unknown>:0
  at TestMono.Console.Buyer.Save () <0x3c0d1c0 + 0x001df> in <filename unknown>:0
  at TestMono.Console.Program.Main () <0x3bd0f58 + 0x00103> in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.NotSupportedException: Unknown Type : timestamp
  at Mono.Data.Tds.TdsMetaParameter.GetMetaType () <0x3c74a90 + 0x0057b> in <filename unknown>:0
  at Mono.Data.Tds.Protocol.Tds70.WriteParameterInfo (Mono.Data.Tds.TdsMetaParameter param) <0x3c72dd0 + 0x000a3> in <filename unknown>:0
  at Mono.Data.Tds.Protocol.Tds70.WriteRpcParameterInfo (Mono.Data.Tds.TdsMetaParameterCollection parameters) <0x3c72b28 + 0x00177> in <filename unknown>:0
  at Mono.Data.Tds.Protocol.Tds70.ExecRPC (System.String rpcName, Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean wantResults) <0x3c729a0 + 0x00083> in <filename unknown>:0
  at Mono.Data.Tds.Protocol.Tds70.ExecProc (System.String commandText, Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean wantResults) <0x3c72940 + 0x00052> in <filename unknown>:0
  at System.Data.SqlClient.SqlCommand.Execute (Boolean wantResults) <0x3c71ee8 + 0x0045b> in <filename unknown>:0
  at System.Data.SqlClient.SqlCommand.ExecuteNonQuery () <0x3c71898 + 0x00047> in <filename unknown>:0
  at TestMono.Console.Buyer.Save () <0x3c0d1c0 + 0x001df> in <filename unknown>:0
  at TestMono.Console.Program.Main () <0x3bd0f58 + 0x00103> in <filename unknown>:0
Comment 1 Tiago Freitas Leal 2016-08-06 17:28:19 UTC
Tested on Mono 4.4.2.11 (Aug 02 2016)
Comment 2 Tiago Freitas Leal 2016-08-06 17:30:28 UTC
Created attachment 16930 [details]
Stored Procedure

Note You need to log in before you can comment on or make changes to this bug.