[Mono-bugs] [Bug 81916][Maj] Changed - When i use the Command.Prepare(), the query doesn't work
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jul 23 09:49:47 EDT 2007
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by marceloalmeida at inb.gov.br.
http://bugzilla.ximian.com/show_bug.cgi?id=81916
--- shadow/81916 2007-07-23 07:38:53.000000000 -0400
+++ shadow/81916.tmp.15213 2007-07-23 09:49:47.000000000 -0400
@@ -60,6 +60,33 @@
* Without "Prepare()"
exec sp_executesql N'SELECT aeCodPessoa, aeMatFunc, aeCracha, aeCodPonto
FROM vwAcessosEmpregados ORDER BY aeCodPonto, aeMatFunc'
------- Additional Comments From anagappan at novell.com 2007-07-23 07:38 -------
Can you please attach a test case to reproduce this issue ?
+
+------- Additional Comments From marceloalmeida at inb.gov.br 2007-07-23 09:49 -------
+The code I use is generated by a Data Layer Class, I have generated
+a similar:
+
+parametroProcedure = ConexaoFactory.CreateParameter()
+parametroProcedure.DbType = DbType.Int32
+parametroProcedure.ParameterName = "@" + "PARAM1"
+parametroProcedure.Value = 1
+comandoProcedure.Parameters.Add(parametroProcedure)
+
+parametroProcedure = ConexaoFactory.CreateParameter()
+parametroProcedure.DbType = DbType.String
+parametroProcedure.ParameterName = "@" + "PARAM2"
+parametroProcedure.Value = "VALOR2"
+parametroProcedure.Size = DirectCast(parametroProcedure.Value,
+String).Length
+comandoProcedure.Parameters.Add(parametroProcedure)
+
+comandoProcedure.CommandType = CommandType.StoredProcedure
+comandoProcedure.CommandText = procedureName
+comandoProcedure.Transaction = _ConexaoTransaction
+comandoProcedure.CommandTimeout =
+comandoProcedure.Connection.ConnectionTimeout
+comandoProcedure.Prepare()
+
+Retorno = comandoProcedure.ExecuteScalar()
More information about the mono-bugs
mailing list