How to upload an image to SQL Server in R

本小妞迷上赌 提交于 2019-12-04 10:55:18

Perhaps if you collapse the pngfilecontents vector into a single string. Something like:

update.query <- "update df_DemandPatternMaster set "
update.query <- paste( update.query, " pngFile = '", paste(pngfilecontents, collapse="") , "' where DemandPatternID = ", sep="")
JD Long

I have not tried this with a database, but I had some challenges recently when serializing to/from a text file. Here's a question I asked that might be related. Have you tried using the ascii=T switch with serialize? Then try it both with and without rawToChar.

I don't have an easy environment to test your code, but I am interested in what you come up with. I'm working on some code where I will eventually be serializing objects and putting them in a DB. I'm just not to that point yet.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!