Hello, I contact you after having unsuccessfully asked my question to R mailing list. I use the package RODBC to connect to a MS-SQL server. I am able to getQuery from the database. I am now studying the sqlSave some data into the database. Unfortunetly, I meet some issues relating to the format of the data that arrives into the database. I have three columns. The first one should be in the MS-SQL format "datetime". The second one in the MS-SQL format "varchar(50)", and the third one in the MS-SQl format "numeric(20,8)". I use the following command line: > sqlSave(channel, DF, tablename="essai_global", rownames=FALSE, oldstyle=FALSE) The data is indeed send to the database. But the types are wrong (varchar(255) pour les trois colonnes.) I have then tried to use the varTypes argument, but I do not manage to use it. If I use the following command lines: > varTypes=c("datetime","varchar(50)","numeric(20,8)") > sqlSave(channel, DF, tablename="essai_global", rownames=FALSE, oldstyle=FALSE) I have the following resturn: Warning message: In sqlSave(channel, DF, tablename = "essai_global", rownames = FALSE, : argument 'varTypes' has no names and will be ignored and the types are still wrong.. How can I use the varTypes??? I have read the documentation, but I dd not manage to find out. Thank you very much Wapita _________________________________________________________________ r ! Téléchargez-le maintenant ! [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.