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

Michael Akerman commented on DBUTILS-77:
----------------------------------------

Here's the code that fails to run the SQL for me:

                        final QueryRunner qr = new QueryRunner();
                        final int rows = qr.update( con, sql, args );
                        return rows;

Here's code that works:
                        final PreparedStatement psm = con.prepareStatement( sql 
);
                        for ( int i=1; i <= args.length; i++ )
                        {
                                psm.setString( i, args[i].toString() );
                        }
                        int rows = psm.executeUpdate();
                        psm.close();
                        return rows;
                
> "drop view" does not work from QueryRunner.update with SQLServer JDBC 
> drivers.  Same SQL works with a PreparedStatement just fine.
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DBUTILS-77
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-77
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: Java environment: Java 6 on Redhat Linux
> Database enviroment: SQLServer 2008
>            Reporter: Michael Akerman
>             Fix For: 1.5
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to