如何在java中用数据库中的return paramter调用一个函数 [英] how to call a function with just return paramter from database in java
本文介绍了如何在java中用数据库中的return paramter调用一个函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用java&我想调用一个只有从数据库到java的返回参数的函数
&我有这个代码&现在我想在主方法中使用这种方法
i m using java & i want to call a function with just a return paramter from database to java
& i'm having this code & now i want this perticular method in main method
cs = connection.prepareCall("{? = call myfunc}");
// Register the type of the return value
cs.registerOutParameter(1, 15);
// Execute and retrieve the returned value
cs.execute();
String retValue = cs.getString(1);
推荐答案
完美,你有我们的许可,继续吧。
既然你没有提出任何问题,很难给你一个更好的答案。
我强烈建议您阅读:
如何提出问题 [ ^ ]和什么你试过吗? [ ^ ]
PS写作解决方案,以避免这个问题在未答复的清单中
Perfect, you have our permission, go ahead.
Since you didn't ask any question, it is difficult to give you a better answer.
I strongly recommend you to read:
How to ask a question[^] and What have you tried?[^]
P.S. Written as solution to avoid this "question" to be in the unanswered list
这篇关于如何在java中用数据库中的return paramter调用一个函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文