Tja jag sitter med följande rad i java:
myDb.setSqlStatement("INSERT INTO Articles (Id, Name, Type, Desription, Price, Quantity) VALUES (\"" + articleNrTextField.getText() + "\" , \"" + "test" + "\" , \"" + categoryList.getSelectedValue() + "\" , \"" + descriptionTextArea.getText() + "\" , \"" + "22" + "\" , \"" + quantityTextField.getText() + "\");");
skriver jag ut den så blir den följande:
INSERT INTO Articles (Id, Name, Type, Desription, Price, Quantity) VALUES ("6" , "test" , "Tools" , "Detaile" , "22" , "6");
Får följande felmedelande:
java.sql.SQLException: [Microsoft][Drivrutin för ODBC Microsoft Access] För få parametrar angavs. 6 förväntades.
Ibland säger den fem ibland 6...
Articles innehåller:
Id (autoincrement)
Name (Text)
Tools (text)
Description (text)
Price (number - long int)
Quantity (number - long int)
Någon som kan tippsa om felet?