I have a problem with RODBC;this is the error :
 chargerExp("C:\\test.csv",NE=1,NC=1,s=1)
 Exeperience: 1    Execution: 1    Sujet: 1 
> ajouter(new ("BDD"),new("Exp"))
[1] "42000 1064 [MySQL][ODBC 5.2(a) Driver][mysqld-5.6.17]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 '  ,  '     NA/NA/NA/ ' , ' NA/NA/NA/ ' , ' NA/NA/NA/ ' , ' NA/NA/NA/ ' , ' NA/NA/NA/' at line 1"
[2] "[RODBC] ERROR: Could not SQLExecDirect 'INSERT INTO `test` (`NE`, `NC`, `E`, `X`, `Y`, 
`Z`,  `T`, `A`, `S`) VALUES (  ,  ,  ' NA/NA/NA/ ' , ' NA/NA/NA/ ' , ' NA/NA/NA/ ' , ' NA/NA/NA/ '     , ' NA/NA/NA/ ' ,  ,   );'"                                               
I'm using Mysql, RODBC and Rstudio with a method ajouter to insert in the data base
setMethod( f ="ajouter",signature =c(x="BDD",obj="Exp"),
       def = function(x, obj)
       {
         channel <- odbcConnect(dsn="RSQL",uid="root",pwd="toor")
         ne <- obj["ne"]
         nc <- obj["nc"]
         s <- obj["S"]
         e<- encoder((obj["E"]))
         x <- encoder((obj["X"]))
         y <- encoder((obj["Y"]))
         z <- encoder((obj["Z"]))
         t<- encoder((obj["T"]))
         a <- (obj["A"])
         requeteSql.valeur <- paste("'",e,"'",",",
                                    "'",x,"'",",",
                                    "'",y,"'",",",
                                    "'",z,"'",",",
                                    "'",t,"'",",")
         requetesql <- paste("INSERT INTO `test` (`NE`, `NC`, `E`, `X`, `Y`, `Z`, `T`, 
        `A`, `S`) VALUES (",ne,",",nc,", ",requeteSql.valeur, a,", ",s,");")
         sqlQuery(channel, requetesql)
       }       
)
This is encoder method. It's main purpose is to convert my object to a text with some concatenation.
setMethod( f ="encoder", signature ="Para",
       def =function(x, i, j, value)
       {
         s <- as.character(x["val"][1])
         for(i in 2:length(x["val"]))
         {
           s <- paste(s,x["val"][i],sep="/")
         }
         return(s)
       }
)
The call of my methods :
ajouter(new ("BDD"), new("Exp"))
This is my table in data base :
          CREATE TABLE `test` (
        `idTest` int(11) NOT NULL AUTO_INCREMENT,
         `NE` int(11) DEFAULT NULL,
         `NU` int(11) DEFAULT NULL,
         `E` text,
         `X` text,
         `Y` text,
         `Z` text,
          T` text,
          `A` float DEFAULT NULL,
          `S` int(11) DEFAULT NULL,
           PRIMARY KEY (`idTest`)
        ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
My problem is from sqlquery, it said that my syntax are not correct, I don't know why.
This is the the object I want to load into the database (from dput so copy/pasteable):
     new("Para"
      , ne= 1
      , nc = 1
      , E = new("E"
      , val = c(-13, -11, -11, -11, -11, -9, -10, -12, -12, -12, -11, -10, 
      -8, -8, -8, -9, -9, -7, -9, -10, -9, -9, -9, -9, -11, -9, -7, 
      -7, -7, -7, -7, -8, -7, -7, -5, -5, -7, -8, -7, -5, -5, -6, -6, 
      -9, -35, -76, -96, -62, 38, 167, 251, 251, 248, 157, 94, 56, 
      )
      )
    , X = new("Para"
    , val = c(115, 116, 114, 113, 113, 114, 115, 114, 114, 113, 112, 111, 
      113, 114, 114, 115, 115, 116, 115, 115, 114, 116, 114, 115, 114, 
      113, 114, 114, 114, 114, 114, 113, 113, 114, 114, 114, 114, 115, 
      114, 115, 115, 115, 114, 115, 116, 114, 114, 114, 116, 115, 113, 
      )
      )
     , Y = new("Para"
    , val = c(10, 11, 9, 9, 10, 9, 10, 9, 11, 10, 11, 10, 11, 11, 10, 11, 
      10, 10, 11, 10, 9, 10, 11, 12, 11, 10, 11, 11, 11, 12, 11, 11, 
      11, 10, 11, 11, 10, 12, 10, 11, 11, 11, 11, 11, 11, 10, 11, 11, 
      10, 11, 11, 11, 10, 11, 11, 11, 10, 11, 10, 12, 11, 10, 10, 10, 
      )
      )
    , Z = new("Para"
    , val = c(-42, -42, -44, -43, -42, -41, -42, -42, -42, -42, -42, -43, 
      -40, -41, -41, -40, -41, -43, -41, -41, -41, -41, -41, -40, -40, 
      -41, -40, -40, -41, -40, -42, -41, -41, -41, -41, -41, -43, -42, 
      -43, -42, -41, -42, -42, -40, -41, -42, -40, -41, -41, -41, -42, 
      )
      , T = new("Para"
     , val = c(25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 
       25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 
      25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 
      25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 25.2, 
      )
      )
   , A = 1L
   , S  = 1
    )
 
     
    