Maison > Article > base de données > PowerBuilder中使用JDBC连接MYSQL无法使用COUNT(*)MAX()函数的处理_MySQL
PowerBuilder中使用JDBC连接MYSQL
遇到的错误:
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中的设置
<span style="font-size:18px;">string sql long ll_count sql = "SET sql_mode = 'IGNORE_SPACE' " EXECUTE IMMEDIATE :sql ; select count(*) into :ll_count from yk_cddz;</span>