Inserting record without any values set results in MySQLSyntaxErrorException

13 views
Skip to first unread message

_k-

unread,
Dec 15, 2014, 9:54:27 AM12/15/14
to activejd...@googlegroups.com
Hello,

Once again me. This time I think I've done all I could to troubleshoot the problem.

If I have a table in my DB that contains only 'record_version' column and try to insert a new record to this table without setting any other values, it results in the following error:
org.javalite.activejdbc.DBException: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' record_version) VALUES (, 1)' at line 1, query: INSERT INTO webpages (, record_version) VALUES (, 1)

As you can see, this happens due to the wrongly formulated SQL query, the unneeded comma as if other values were to be inserted along:
INSERT INTO webpages (, record_version) VALUES (, 1)

I am using the 1.4.10-SNAPHOST version of ActiveJDBC.

Igor Polevoy

unread,
Dec 15, 2014, 11:25:36 PM12/15/14
to activejd...@googlegroups.com
Can you please post a full description of your table and ActiveJDBC API call that fails? 

Please, post this information here: https://github.com/javalite/activejdbc/issues

Thanks

_k-

unread,
Dec 17, 2014, 3:41:53 AM12/17/14
to activejd...@googlegroups.com
Posted. :)

Igor Polevoy

unread,
Dec 17, 2014, 5:13:34 PM12/17/14
to activejd...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages