out-parameters

H2: How to create a stored procedure with out parameters

£可爱£侵袭症+ 提交于 2020-02-02 08:53:49
问题 I am attempting to create a stored procedure with out parameters in a JUnit test that is configured with Spring (non-boot). I understand from documentation and examples that I must alias a static method to respond to the stored procedure call. However, I can find no mention of how this works with out parameters. What goes in the method signature of the static method? package com.example; import static java.sql.Types.INTEGER; import java.sql.CallableStatement; import java.sql.ResultSet; import

Is there a VB.NET equivalent of C# out parameters?

元气小坏坏 提交于 2020-01-26 16:27:50
问题 Does VB.NET have a direct equivalent to C# out function parameters, where the variable passed into a function does not need to be initialised? 回答1: No, there is no equivalent of the out keyword in VB. However, VB does automatically initialise all local variables in a method, so you can use ByRef without needing to explicitly initialise the variable first. Example: Sub Main() Dim y As Integer Test(y) End Sub Sub Test(ByRef x As Integer) x = 42 End Sub (If you examine code in the framework (for

Cant call pl-sql stored procedure with OUT Parameter oracletypes.cursor

狂风中的少年 提交于 2020-01-16 18:26:26
问题 I need some help to call a Oracle Stored Procedure in Groovy and receive a ResultSet by an Output Parameter. I can call stored procedure with output parameters of other data types, but for CURSOR I cannot find the way. "I'm always getting the error "java.sql.SQLException: Cursor is closed." The parameter (bellow) is: " Sql.out(OracleTypes.CURSOR), // lista de possiveis varios items a consumir " Below my code (The connection is already openI def consumeProvisioning(Sql sql) { int nRes sql.call

Null out parameters in C#?

懵懂的女人 提交于 2020-01-11 08:09:47
问题 After reading on stackoverflow that in the case of checking the format of a DateTime you should use DateTime.TryParse. After trying some regex expressions they seem to get long and nasty looking to cover lots of the formatting. But TryParse requires an "out" parameter and since I just want to do a validation format check I don't need the actual result. So I am left with a variable that holds the "out" result and am to do nothing with it. Is there a way so I don't have to do a out parameter?

Can I call a stored procedure in a cfloop and output dynamic out-parameters in Coldfusion?

烈酒焚心 提交于 2020-01-06 05:41:08
问题 Last question for tonight, still using Coldfusion8 and MySQL. I have a table with products, each with Price A, B and C. I need to retrieve the min and max values for A,B,C across all prices (A_min, A_max, B_min, B_max, C_min, C_max) I thought I would create a stored procedure and loop through A,B,C like so: <cfloop list="A,B,C" index="what" delimiters=","> <cfstoredproc procedure="proc_search_select_minmax" datasource="dtb"> <cfprocparam type="in" value="#what#" cfsqltype="cf_sql_varchar"

Code analysis comes back with suggestion about not using “out” parameters

廉价感情. 提交于 2020-01-01 10:53:03
问题 I ran the VS 2008 code analysis tool against an object I created and received the following suggestion ... Warning 147 CA1021 : Microsoft.Design : Consider a design that does not require that 'returnValue' be an out parameter. I find "out" parameters rather useful and didn't realize that they were considered as a frowned upon design practice. I wanted to know if someone could shed some light on the reason that I received this Warning? If it is bad practice? why? and what would be good

Code analysis comes back with suggestion about not using “out” parameters

冷暖自知 提交于 2020-01-01 10:52:06
问题 I ran the VS 2008 code analysis tool against an object I created and received the following suggestion ... Warning 147 CA1021 : Microsoft.Design : Consider a design that does not require that 'returnValue' be an out parameter. I find "out" parameters rather useful and didn't realize that they were considered as a frowned upon design practice. I wanted to know if someone could shed some light on the reason that I received this Warning? If it is bad practice? why? and what would be good

Code analysis comes back with suggestion about not using “out” parameters

梦想的初衷 提交于 2020-01-01 10:51:58
问题 I ran the VS 2008 code analysis tool against an object I created and received the following suggestion ... Warning 147 CA1021 : Microsoft.Design : Consider a design that does not require that 'returnValue' be an out parameter. I find "out" parameters rather useful and didn't realize that they were considered as a frowned upon design practice. I wanted to know if someone could shed some light on the reason that I received this Warning? If it is bad practice? why? and what would be good

Is there a way to omit out parameter? [duplicate]

送分小仙女□ 提交于 2019-12-30 03:44:23
问题 This question already has answers here : C# 4.0 optional out/ref arguments (9 answers) Closed 6 years ago . Let's assume I have a function with out parameter, however I do not need its value. Is there a way to pass no actual parameter if given result will be thrown away anyway? EDIT: Although the question has been voted to be dupe of Optional Output Parameters it only is if you look from the method creator's perspective. If you're the user of the method, you're interested not in making the

Using ouput parameter of type SYS_refcursor

喜你入骨 提交于 2019-12-24 11:13:34
问题 In my database I have a stored procedure with an OUTPUT parameter of type SYS_REFCURSOR. The application side is wrtitten in C#. Can I assign this procedure's output parameter to a Datatable like: ............. OracleConnection con=new OracleConnection(......); OracleCommand cmd=new OracleCommand("MyStoredProc",con); cmd.CommandType=CommandType.StoredProcedure; cmd.Parameters.Add("REC_CUR",OracleType.Cursor).Direction=ParameterDirection.Output; con.Open(); cmd.ExecuteNonQuery(); DataTable dt=