在连接字符串里加上 Allow User Variables=True 因为sql语句里边带了自定义参数了,如@rownum这种参数。 Allow User Variables=True允许用户自定义参数。