tags:

views:

40

answers:

0

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

I've a (MS-Access) table with e.g. columns A, B, C en D and if I send a sqlSave command with a data frame with columns A, B en D (no C) 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? Are there arguments of sqlSave I can use? I can't find them in the documentation