You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "sjy (JIRA)" <ji...@apache.org> on 2010/07/21 08:08:50 UTC

[jira] Created: (DBUTILS-71) insert error

insert error
------------

                 Key: DBUTILS-71
                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
             Project: Commons DbUtils
          Issue Type: Bug
    Affects Versions: 1.3
         Environment: windows xp,tomcat,mssql,mysql,sqlite
            Reporter: sjy


i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances values(?,?,?)",1,"2","2009-01-01");
successed in mysql,
in mssql has error(near where the wrong syntax);
in sqlite (error is id can't auto increment)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DBUTILS-71) insert error

Posted by "sjy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sjy resolved DBUTILS-71.
------------------------

    Resolution: Fixed

i have solved it,wo used jtds driver,it's work well.


> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>         Attachments: Configurations.java, Maintance.java, QueryHelper.java
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(Keyword 'where' syntax error near);i test in mssql2000,mssql2005,use new and old jdbc, the same result.
> stacktrace
> Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
> at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DBUTILS-71) insert error

Posted by "Julien Aymé (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890567#action_12890567 ] 

Julien Aymé commented on DBUTILS-71:
------------------------------------

Hi,

I don't think this is a DBUTILS issue, rather a SQL issue.
In order to make your code more independant from the database you use, you should specify the columns to insert into:

"INSERT INTO maintances(tr_userid, trouble, tr_time) values(?,?,?)"

Note that you should ask your questions on the user list before creating an issue, if you are not sure this is an issue.

Regards,
Julien

> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,
> in mssql has error(near where the wrong syntax);
> in sqlite (error is id can't auto increment)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DBUTILS-71) insert error

Posted by "sjy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sjy updated DBUTILS-71:
-----------------------

    Description: 
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
successed in mysql,sqlite
in mssql has error(near where the wrong syntax);


  was:
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances values(?,?,?)",1,"2","2009-01-01");
successed in mysql,
in mssql has error(near where the wrong syntax);
in sqlite (error is id can't auto increment)



> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(near where the wrong syntax);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DBUTILS-71) insert error

Posted by "Julien Aymé (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890583#action_12890583 ] 

Julien Aymé commented on DBUTILS-71:
------------------------------------

Could you provide more informations regarding the mssql error, such as the stacktrace ?

> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(Keyword 'where' syntax error near);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DBUTILS-71) insert error

Posted by "sjy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sjy updated DBUTILS-71:
-----------------------

    Description: 
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
successed in mysql,sqlite
in mssql has error(Keyword 'where' syntax error near);


  was:
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
successed in mysql,sqlite
in mssql has error(near where the wrong syntax);



> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(Keyword 'where' syntax error near);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DBUTILS-71) insert error

Posted by "sjy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890598#action_12890598 ] 

sjy commented on DBUTILS-71:
----------------------------

i have attach my java code, and add track trace about this problom

> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>         Attachments: Configurations.java, Maintance.java, QueryHelper.java
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(Keyword 'where' syntax error near);
> tracks
> Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
> at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (DBUTILS-71) insert error

Posted by "sjy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sjy closed DBUTILS-71.
----------------------


the problem is jdbc error

> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>         Attachments: Configurations.java, Maintance.java, QueryHelper.java
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(Keyword 'where' syntax error near);i test in mssql2000,mssql2005,use new and old jdbc, the same result.
> stacktrace
> Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
> at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DBUTILS-71) insert error

Posted by "sjy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sjy updated DBUTILS-71:
-----------------------

    Description: 
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
successed in mysql,sqlite
in mssql has error(Keyword 'where' syntax error near);i test in mssql2000,mssql2005,use new and old jdbc, the same result.
stacktrace
Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)




  was:
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
successed in mysql,sqlite
in mssql has error(Keyword 'where' syntax error near);i test in mssql2000,mssql2005,use new and old jdbc, the same result.
tracks
Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)





> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>         Attachments: Configurations.java, Maintance.java, QueryHelper.java
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(Keyword 'where' syntax error near);i test in mssql2000,mssql2005,use new and old jdbc, the same result.
> stacktrace
> Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
> at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DBUTILS-71) insert error

Posted by "sjy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sjy updated DBUTILS-71:
-----------------------

    Description: 
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
successed in mysql,sqlite
in mssql has error(Keyword 'where' syntax error near);
tracks
Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)




  was:
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
successed in mysql,sqlite
in mssql has error(Keyword 'where' syntax error near);



> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(Keyword 'where' syntax error near);
> tracks
> Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
> at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DBUTILS-71) insert error

Posted by "sjy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sjy updated DBUTILS-71:
-----------------------

    Attachment: QueryHelper.java
                Configurations.java
                Maintance.java

> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>         Attachments: Configurations.java, Maintance.java, QueryHelper.java
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(Keyword 'where' syntax error near);
> tracks
> Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
> at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DBUTILS-71) insert error

Posted by "sjy (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DBUTILS-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

sjy updated DBUTILS-71:
-----------------------

    Description: 
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
successed in mysql,sqlite
in mssql has error(Keyword 'where' syntax error near);i test in mssql2000,mssql2005,use new and old jdbc, the same result.
tracks
Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)




  was:
i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
QueryRunner runner = new QueryRunner();
runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
successed in mysql,sqlite
in mssql has error(Keyword 'where' syntax error near);
tracks
Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)





> insert error
> ------------
>
>                 Key: DBUTILS-71
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-71
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: windows xp,tomcat,mssql,mysql,sqlite
>            Reporter: sjy
>         Attachments: Configurations.java, Maintance.java, QueryHelper.java
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> i have a table maintances(id,tr_userid,trouble,tr_time),id is autoincrement.when i use code below insert into table
> QueryRunner runner = new QueryRunner();
> runner.update(conn,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?)",1,"2","2009-01-01");
> successed in mysql,sqlite
> in mssql has error(Keyword 'where' syntax error near);i test in mssql2000,mssql2005,use new and old jdbc, the same result.
> tracks
> Caused by:java.sql.SQLException:com.microsoft.sqlserver.jdbc.SQLServerException:关键字'where'附近有语法错误。Query:,"INSERT INTO maintances(tr_userid,trouble,tr_time) values(?,?,?) Parameters:[1,2,2009-01-01]
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542)
> at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:599)
> at com.softwarementors.extjs.djn.demo.Maintance.insertMaintance(Maintance.java:49)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.