我正在尝试从 SQL Server 导入数据,但在导入包含 uniqueidentifier 列类型的表时遇到问题。
我正在使用 R Client 3.3.2.0 来查询数据库。
数据库表:
代码:
sqlConnString = "DRIVER=ODBC Driver 11 for SQL Server;SERVER=JDIMKO;DATABASE=Test;UID=sa;PWD=***;"
colClasses = c("id" = "integer", "ui" = "character")
sqlServerData <- RxSqlServerData(
sqlQuery = "select * from tbl1",
connectionString = sqlConnString, colClasses = colClasses)
custData = rxImport(sqlServerData)
错误:
Unhandled SQL data type!!!
Unhandled SQL data type!!!
Could not open data source.
Error in doTryCatch(return(expr), name, parentenv, handler) :
Could not open data source.