inserting strings in a database
Hello all!
I am trying to insert string values in a database with this metode.
publicvoid insertData(){
[code]try{
String url ="jdbc:odbc":"+database;
Connection connection = DriverManager.getConnection(url, user, password);
Statement status = connection.createStatement();
status.executeUpdate("INSERT INTO radiograhy (Title, Red, Green, Blue,"
+"Hue,Saturation,Value,Color,Path,IdRadiography,Description) VALUES "
+"("+Title+","+Red+","+ Green+","+ Blue +","
+ Hue+","+Saturation+","+Value+","+Color+","+Path+","
+IdRadiography+","+Description+")");
}catch(SQLException e){
e.printStackTrace();
System.out.println(e);
}
but the metode throws me an exception :
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

