在Windows 11机器上尝试在R-Studio中运行数据库查询时获得错误1655相同代码在装有Windows 10的旧机器上运行良好
由于更换了计算机(旧的有Windows 10,新的有Windows 11),我的ODBC查询停止工作在相同的代码。连接到数据库建立没有错误:
library(odbc)
library(DBI)
ImpODBC <- dbConnect(odbc::odbc(), "********", uid = "******", PWD = "*******")
但是查询
IMP_Sales <- dbGetQuery(ImpODBC, "Select SBLOC,SBCUST,SBSMNO,SBITEM,SBTYPE,SBINDT,SBPHYP,SBQSHP,SBEPRC,SBPRIC,SBICST,SBINV,SBCOSTPC,SBUM,SASHIP
From R50FILES.VSADETL
JOIN R50FILES.VSAHEAD
ON SBCMP=SACMP and SBORD=SAORD and SABOCD=SBBOCD
Where SBINV<>999999999 and SBPCOD <> 'LS' and SBCMP = 1 and SBPHYP between 202201 and 202212 and SBITEM <> ''")
返回以下错误:
Error: nanodbc/nanodbc.cpp:1655: HY000: 躠娽ŋ 覀娽ŋ
<SQL> 'Select SBLOC,SBCUST,SBSMNO,SBITEM,SBTYPE,SBINDT,SBPHYP,SBQSHP,SBEPRC,SBPRIC,SBICST,SBINV,SBCOSTPC,SBUM,SASHIP
From R50FILES.VSADETL
JOIN R50FILES.VSAHEAD
ON SBCMP=SACMP and SBORD=SAORD and SABOCD=SBBOCD
Where SBINV<>999999999 and SBPCOD <> 'LS' and SBCMP = 1 and SBPHYP between 202201 and 202212 and SBITEM <> '''
怎么啦?
1条答案
按热度按时间tnkciper1#
2022年12月5日的Windows补丁中断了ODBC连接。没有变通办法,微软知道并正在处理它,时间表未知。我正在使用一台未打补丁的计算机,同时执行一个关键的数据库功能。