StoredProcedure with out parameter is not working

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

StoredProcedure with out parameter is not working

Post by Zero-G. » Sat 03 Oct 2009 16:11

Hey
I use your latest components of dotConnect for mySQL
In my VB.Class (generated by your entity developer) I get the following code, based on my SP

Code: Select all

  _
		Public Function Rechnungvergeben( ByVal Uebergabeid As String, _
				 ByVal Isbezahlt As System.Nullable(Of Short), _
				 ByVal Zahlungsart As String, _
				 ByVal Kundenname As String, _
				 ByVal Kundenadresse As String, _
				 ByVal Auftragsbetrag As System.Nullable(Of Decimal), _
				 ByVal Bezahlterbetrag As System.Nullable(Of Decimal), _
				 ByVal Mitarbeitername As String, _
				 ByVal Fid As System.Nullable(Of Long), _
				 ByVal Rnr As System.Nullable(Of Integer), _
				 ByVal Auftragsjahr As System.Nullable(Of System.DateTime), _
				 ByRef Nrenummer As System.Nullable(Of Integer)) As System.Int32
			Dim result As IExecuteResult = Me.ExecuteMethodCall(Me, CType(MethodInfo.GetCurrentMethod,MethodInfo), Uebergabeid, Isbezahlt, Zahlungsart, Kundenname, Kundenadresse, Auftragsbetrag, Bezahlterbetrag, Mitarbeitername, Fid, Rnr, Auftragsjahr, Nrenummer)
			Nrenummer = CType(result.GetParameterValue(11), System.Nullable(Of Integer))
            Return CType(result.ReturnValue, System.Int32)
		End Function
The problem is, that I don't get back a value (it's always 0)

But, when I change the Return statement to:

Code: Select all

Return Nrenummer
Then it works fine.

THX

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 05 Oct 2009 13:16

Thank you for the report.
We are working on a new template engine, this engine should fix the problem.
I will let you know as soon as it is available.

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Mon 05 Oct 2009 14:14

Thank you

Post Reply