Subject | Re: [Firebird-Java] Please help - CallableStatement only returning first row of ResultSet |
---|---|
Author | Roman Rokytskyy |
Post date | 2007-09-16T17:53:27Z |
DriverManager.getConnection("jdbc:firebirdsql:localhost/3050:D:\\Programs\\Firebird\\examples\\empbuild\\employee.fdb",
((FirebirdCallableStatement)stmt).setSelectable(true);
selectable or executable when it is specified in the escaped syntax.
System tables also do not provide such information. So, it uses EXECUTE
PROCEDURE by default. For selectable procedures developer has to provide
a hint to Jaybird to use SELECT ... FROM call instead.
Roman
> "sysdba", "masterkey");Add the following call here:
> CallableStatement stmt = conn.prepareCall("{call foo(?)}");
((FirebirdCallableStatement)stmt).setSelectable(true);
> stmt.setString(1, "Germany");The issue is that Jaybird has no idea whether the procedure is
> ResultSet rs = stmt.executeQuery();
> while (rs.next())
> System.out.println(rs.getString(1));
> conn.close();
>
> What am I doing wrong?
> I am running FB 2.0.1, jaybird-full-2.1.1.jar, JDK 1.5.04 on Win XP Pro.
selectable or executable when it is specified in the escaped syntax.
System tables also do not provide such information. So, it uses EXECUTE
PROCEDURE by default. For selectable procedures developer has to provide
a hint to Jaybird to use SELECT ... FROM call instead.
Roman