嗨,我想了解如何将 java 代码转换为 C#,我阅读了一些关于 java 的教程,但我没有找到如何翻译这行代码的方法:
CallableStatement cstmt = con.prepareCall("?=CALL
cstmt.registerOutParameter(1, Types.JAVA_OBJECT);
cstmt.execute();
ResultSet rs = (ResultSet) cstmt.getObject(1);
我尝试
CUBRIDConnection con = new CUBRIDConnection(ConnectionString);
CUBRIDCommand com = new CUBRIDCommand();
com.CommandType = CommandType.StoredProcedure;
com.Connection = con;
com.CommandText = "call mySP();";
com.Parameters.Add("?=p", CUBRIDDataType.CCI_U_TYPE_RESULTSET).Direction =
ParameterDirection.Output;
con.Open();
DbDataReader df = com.ExecuteReader(CommandBehavior.SingleResult);
//some stuff
con.Close();
这不起作用,我该如何翻译?