How do I resolve the error in inserting memo in Access from a Java program?
4159 the size of the string
the error
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
The source code that executes the insert statement:
statement.executeUpdate("INSERT INTO webData VALUES ("+"'" + list.get(y)+"','"+data+ "')");
4159 the size of data
my schma is :
table name webData with 2 coulmun the
first ID of type text
the second Field1 of type memo
i have update the statment but i have get the same error:
statement.executeUpdate("INSERT INTO webData 开发者_开发技巧(ID,Field1) VALUES ("+"'" + list.get(y)+"','"+data+ "')");
Thank you
Please post your schema.
Rather than doing:
INSERT INTO webData VALUES (...)
You should be doing:
INSERT INTO webData (MyColumn1, MyColumn2) VALUES (...)
Do not rely on the physical column order in the table, you should state it explicitly to avoid errors.
Does the comma have to be in speech marks and inverted commas? You can simplify this, just a tip :). But yes, post your DB scheme.
精彩评论