cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Picasso <oscgoo...@yahoo.com>
Subject Problem with esql and maxdb stored procedures
Date Thu, 23 Sep 2004 16:52:04 GMT
Hi,

I have trouble with esql when calling a stored procedure in MaxDB (formerly SAP
DB).

I have tried to adapt the examples in the "ESQL Taglib" documentation and tried
many combinations of esql tags and attributes but cannot make it work.

I always get some kind of exception or nothing.

I can connect to database and execute sql statements with esql. I only have
problems with stored procedures. On the other hand if I execute the call
statement directly from java it just work fine.

Here is an example of java code that works fine.

...
Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");
String url = "jdbc:sapdb:///ADS";
Connection con = DriverManager.getConnection(url, "scott", "scott-password");
CallableStatement p = con.prepareCall("CALL GET_PERSONS");
ResultSet result = p.executeQuery();
result.first();
while(!result.isAfterLast())
{
  System.out.println(result.getInt("ID") + ", " +
result.getString("FIRST_NAME") + ", " + result.getString("LAST_NAME"));
  result.next();
}
con.close();
...

RESULTS:
3, John, Smith
4, Javier, Perez

The stored procedure doesn't use any parameter (either IN or OUT) and just
returns a cursor.

Could someone show me how the same procedure call should be done with esql?

Thanks.


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message