时间:2021-07-01 10:21:17 帮助过:20人阅读
遇到的错误:
long ll_count // Profile mysql SQLCA.DBMS = "JDBC" SQLCA.LogPass = "123" SQLCA.LogId = "root" SQLCA.AutoCommit = False SQLCA.DBParm = "Driver='com.mysql.jdbc.Driver',URL='jdbc:mysql://localhost:3306/his' " connect using sqlca; select count(*) into :ll_count from yk_cddz;
很简单的一条语句,竟然报错了!
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) from yk_cddz' at line 1
找了百度没有人写个贴子,于是查看MYSQL的使用手册,终于在
Powerbuilder中的设置
string sql
long ll_count
sql = "SET sql_mode = 'IGNORE_SPACE' "
EXECUTE IMMEDIATE :sql ;
select count(*) into :ll_count from yk_cddz;