开发者

how to execute procedure with netbeans?

开发者 https://www.devze.com 2023-02-18 20:53 出处:网络
how can i execute a procedure in netbeanse? I write bellow query but it has error. statement.execute(\"call c开发者_StackOverflow中文版ustomer_fnaem(\'lisa\',\'test\')\");

how can i execute a procedure in netbeanse?

I write bellow query but it has error.

statement.execute("call c开发者_StackOverflow中文版ustomer_fnaem('lisa','test')");


I assume that by 'Netbeans' that you mean you want to call a stored procedure from Java. Using JDBC it would be something like the following:

CallableStatement statement = connection.prepareCall("{ call customer_fnaem(?, ?) }");
proc.setString(1, "lisa");
proc.setString(2, "test");
cs.execute();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号