Folks, As reproduced in the code below, our data is being transformed during the sqlFetch() operation. This has apparently been an issue since 2002. Are there any ways for correctly reading data from MS SQL Server 2005? Why does RODBC ignore the type information supplied by SQL Server?
require(RODBC) lakes <- odbcConnect('Lakes',uid='cseelige') tt <- data.frame('a'='1234', 'b'='5678', 'c'=123.456, stringsAsFactors=FALSE) sqlSave(lakes, tt, tablename='testtest', verbose=FALSE, safer=FALSE, test=FALSE, append=FALSE, fast=FALSE, rownames=FALSE) # This shows the columns exist as varchar, varchar, float on the server sqlColumns(lakes, 'testtest') # This shows the columns are fetched as int, int, num instead of chr, chr, num. str(sqlFetch(lakes, 'testtest')) Thank you for your time, cur -- Curt Seeliger, Data Ranger Raytheon Information Services - Contractor to ORD seeliger.c...@epa.gov 541/754-4638 [[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.