Learned taht I could pass the file.format to sqldf directly instead of calling attr on my file handle.