Skip to content

RODBC sqlSave not all columns

1 message · waanders

#
Hello,

How can I make sqlSave only to write a subset of columns.

I've a (MS-Access) table with columns A, B, C en D and if I send a sqlSave
command with a data frame with columns A, B en D I get the message:

Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test,  : 
  missing columns in 'data'
Calls: sqlSave -> sqlwrite -> odbcUpdate

(The columns in my table are all defined optional)

I can add a dummy column to my data frame with name C and value NA and
sqlSave will be happy, but is there another way to do this? Arguments to
sqlSave? I can't find them in the documentation.

Regards.