在asp经典中如何执行MySQL多重查询?

在asp经典中如何执行MySQL多重查询?

问题描述:

asp - > odbc - > mysql,多查询问题。在asp经典中如何执行MySQL多重查询?

dbCon.execute("update wp_posts set post_abc = '1234' where ID=1602';");:没问题

dbCon.execute("set @aa=1602;update wp_posts set post_abc = '1234' where [email protected];");:错误

ERR消息:

[MySQL的] [ODBC 5.2(w)的驱动程序]的[mysqld-5.1.45p1日志]你有你的SQL语法错误;检查对应于你的MySQL服务器版本使用附近的“更新wp_posts正确的语法手册........

我该如何解决这个问题? SOS !!!

不喜欢的答案:

dbCon.execute("set @aa=1602;"); 
dbCon.execute("update wp_posts set post_abc = '1234' where [email protected];"); 

前往

详情添加MULTI_STATEMENTS=1在连接字符串,或启用在DSN项多个查询 - >连接 - >允许多个语句

+0

MULTI_STATEMENTS = 1:好!好!好!好!好!好!好!谢谢你!谢谢你!谢谢你!谢谢你!谢谢你!谢谢你!谢谢你!感谢-U!^^ –