Problems with RODBC sqlSave

后端 未结 6 901
轻奢々
轻奢々 2021-02-14 17:39

I\'m having some difficulty inserting a data frame into a mySql database using RODBC. Below is the code I\'m using:

data <- data.frame(analysedDataID=c(1,2,3         


        
6条回答
  •  心在旅途
    2021-02-14 18:15

    I got the same error and the problem was the destination table data types. Even it seems there were possible data conversion.
    The solution steps were:

    1. use an unused table name (new table);
    2. set append=False and get the "create table" showed at error msg;
    3. run that create table at database;
    4. the "saveSql" now works either with append=False or append=True.

    It is useful setting "verbose=T" to check exactly where the problem occurs.

提交回复
热议问题