title: RODBC - sqlSave - Why is so much memory being requested?
body: <p>I have some R code that looks as follows:</p>
  
  <pre><code>missingDataJson &lt;- toJSON(head(diff))
  
  df &lt;- data.frame(ValidationDate = startTime, DataType = "Panel", MissingData = missingDataJson, stringsAsFactors = F)
  
  sqlSave(odsHandle, df, tablename = "Utility.DailyDataValidation", append=T)
  </code></pre>
  
  <p>The data frame "df" looks as follows:</p>
  
  <pre><code>df
         ValidationDate DataType
  1 2016-08-22 13:40:37    Panel
                                                                                                                                                                                         MissingData
  1 {"SubId":[160822032032,160822032033,160822032034,160822032035,160822032036,160822032037],"ReadTime":[1471887657.787,1471887681.357,1471887705.023,1471887728.483,1471887752.273,1471887776.423]}
  </code></pre>
  
  <p>When I execute sqlSave, I get the following error message:</p>
  
  <pre><code>Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test,  : 
    'Calloc' could not allocate memory (18446744071562067968 of 1 bytes)
  In addition: Warning messages:
  1: In odbcUpdate(channel, query, mydata, coldata[m, ], test = test,  :
    Reached total allocation of 16287Mb: see help(memory.size)
  2: In odbcUpdate(channel, query, mydata, coldata[m, ], test = test,  :
    Reached total allocation of 16287Mb: see help(memory.size)
  </code></pre>
  
  <p>Why is so much memory being requested? The size of the data frame is quite small.</p>