I created a table in mysql db. it has a column with auto increment value. i checked inserting data through mysql console putting jst ' ' to the place of the auto increment value in the query. it worked ok.

but when i do it through my java application (using execute query command) it says..' out of range value adjusted to column' refering to that particular auto increment column.

what is the problem here?

(sql cosole gives the same error but it adds the record to the table!...saw it little late)

Just simply don't include that field in the insert. i.e. you have table with field1 and field2 and field1 is auto_increment and field2 is varchar. So your query is insert into table (field2) values ('a')

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.