[ 
https://issues.apache.org/jira/browse/DERBY-2859?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826837#comment-13826837
 ] 

Rick Hillegas edited comment on DERBY-2859 at 11/19/13 7:27 PM:
----------------------------------------------------------------

Ha Mano,

Ah. This JIRA deals with SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE, a 
procedure which takes 6 parameters. But now I see that you are talking about 
SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE, a procedure which takes 7 
parameters. The following program works correctly for me using both 10.3.3 and 
10.10.1:

{noformat}
import java.sql.*;

public class y
{
    public static void main( String[] args ) throws Exception
    {
        Connection  conn = DriverManager.getConnection( 
"jdbc:derby:db;create=true" );

        conn.prepareStatement( "create table t( a int, b clob )" ).execute();

        PreparedStatement   ps = conn.prepareStatement( "insert into t values ( 
?, ? )" );
        ps.setInt( 1, 1 );
        ps.setString( 2, "abc" );
        ps.setInt( 1, 2 );
        ps.execute();
        ps.setString( 2, "def" );
        ps.execute();
        ps.close();

        PreparedStatement   ps2 = conn.prepareStatement
            ( "CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE( 
?,?,?,?,?,?,? )" );
        ps2.setString( 1, "APP" );
        ps2.setString( 2, "T" );
        ps2.setString( 3, "t.dat" );
        ps2.setString( 4, null );
        ps2.setString( 5, null );
        ps2.setString( 6, null );
        ps2.setString( 7, "t.clobs" );
        ps2.execute();
        ps2.close();
    }

}
{noformat}

Hope this helps,
-Rick



was (Author: rhillegas):
Ha Mano,

Ah. This JIRA deals with SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE, a 
procedure which takes 6 parameters. But now I see that you are talking about 
SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE, a procedure which takes 7 
parameters. The following program works correctly for me using both 10.3.3 and 
10.10.1:

{
import java.sql.*;

public class y
{
    public static void main( String[] args ) throws Exception
    {
        Connection  conn = DriverManager.getConnection( 
"jdbc:derby:db;create=true" );

        conn.prepareStatement( "create table t( a int, b clob )" ).execute();

        PreparedStatement   ps = conn.prepareStatement( "insert into t values ( 
?, ? )" );
        ps.setInt( 1, 1 );
        ps.setString( 2, "abc" );
        ps.setInt( 1, 2 );
        ps.execute();
        ps.setString( 2, "def" );
        ps.execute();
        ps.close();

        PreparedStatement   ps2 = conn.prepareStatement
            ( "CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE_LOBS_TO_EXTFILE( 
?,?,?,?,?,?,? )" );
        ps2.setString( 1, "APP" );
        ps2.setString( 2, "T" );
        ps2.setString( 3, "t.dat" );
        ps2.setString( 4, null );
        ps2.setString( 5, null );
        ps2.setString( 6, null );
        ps2.setString( 7, "t.clobs" );
        ps2.execute();
        ps2.close();
    }

}

Hope this helps,
-Rick
}

> Misleading error message if you supply too many arguments to 
> SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2859
>                 URL: https://issues.apache.org/jira/browse/DERBY-2859
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL, Tools
>    Affects Versions: 10.3.1.4
>            Reporter: Rick Hillegas
>            Priority: Minor
>              Labels: derby_triage10_5_2
>
> If you supply too many arguments to 
> SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE, you get an error message 
> telling you that SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE is an unknown 
> procedure. Instead, you should get an error message which tells you that the 
> signature can't be matched to a known overload of the procedure:
> ij> call SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE
> (
>   'select * from lobtable where updateCount in( 2, 4 )',
>   'LOBTABLE',
>   '/export/home/rick/junk/test-export-table1.dat',
>   null,
>   null,
>   null,
>   '/export/home/rick/junk/test-export-query1-lobs.dat'
> );
> ERROR 42Y03: 'SYSCS_UTIL.SYSCS_EXPORT_QUERY_LOBS_TO_EXTFILE' is not 
> recognized as a function or procedure.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to