on 07-26-2007 7:14 AM
MaxDB version 7.7
I have written a DBPROC , and it created successfully
Create DBPROC A.test AS
select * from A.B
(A - Schema name; B - Table name)
However, when I try to call it :
call A.test
if failed with "Error Executing 'CALL A.test' SAP DBTech JDBC: Call of execute(String) is not allowed for PreparedStatement."
And I try to call some system defaul procedures, still the same problems.
Anyone who can tell me why? or how to call it correctly?
Thanks very much !!!
Hello Xuan,
A prepared statement executes the command given at prepare time. This is
normal JDBC, and nothing specific to MaxDB
So either use a 'normal' statement:
...
Statement s = connection.createStatement();
s.execute("CALL A.test")
...
or use a callable statement and prepare the command:
...
CallableStatement c = connection.prepareCall("CALL A.test");
c.execute();
...
Regards
Alexander Schröder
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexander Schröder,
Thank you very much !
However, I just ran the statement in MaxDB Database Studio (I new a SQL editor), which just like you writing SQL statement on Query Analyser in Microsoft SQL Server.
So , I wanna if there are some settings I need to modify ? or any other reasons ?
Thank you !
Best Regards,
Bi,Xuan
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.