1. ? ?
  2. PowerBuilder
  3. Thursday, 5 May 2022 13:07 PM UTC

是不是pb2019没有专门的数据库接口连接mysql ,  如果用比如odbc 或 ado 或 jdbc  等方式连接mysql ,用哪种连接更稳定,性能更好? 怎样连接?

谢谢

Ken Guo @Appeon Accepted Answer Pending Moderation
  1. Friday, 6 May 2022 06:48 AM UTC
  2. PowerBuilder
  3. # 1

您好,

我们建议你使用ODBC的方式连接MYSQL数据库,你需要先安装MYSQL Connector ODBC Package,然后就可以通过Windows ODBC Data Source连接你的数据库了。

另外,我不建议你使用JDBC,因为PB 2022已经移除对Java的支持,PB 2022将不再支持JDBC。

 

Regards

Ken

 

Comment
  1. Miguel Leeuwe
  2. Friday, 6 May 2022 07:14 AM UTC
Hi Ken,

That's crazy!

The previous company that I worked for won't be able to upgrade to PB2022. Most of their customers depend on a JDBC connection.

They'll probably stop using Powerbuilder alltogether.

regards.
  1. Helpful
  1. Ken Guo @Appeon
  2. Monday, 9 May 2022 07:42 AM UTC
Hi Miguel,



Due to an assortment of reasons, PB 2022 no longer supports Java, including JDBC. Please see the following link for details:

https://www.appeon.com/developers/obsolete-and-discontinued-features-in-powerbuilder-2022.html



Regards,

Ken

  1. Helpful
There are no comments made yet.
? ? Accepted Answer Pending Moderation
  1. Sunday, 8 May 2022 01:31 AM UTC
  2. PowerBuilder
  3. # 2

你好: 我试了下,电脑安装好odbc驱动后,电脑上可以用,但手机端不行,提示连接出错, 是不是配置信息有问题,是不是要数据库ip地址,如果要添加哪里?

//SQLCAaa=create Transaction;
//SQLCAaa.DBMS = "ODBC"
//SQLCAaa.AutoCommit = False
//SQLCAaa.DBParm = "ConnectString='DSN=mysql;UID=root;PWD=111'"
//If SQLCAaa.SQLCODE <> 0 Then
// MessageBox (""," 网络数据库连接出错-mysql库! ")
// Halt Close
// Return
//
//End If
//

Comment
  1. Ken Guo @Appeon
  2. Monday, 9 May 2022 05:18 AM UTC
您好,你说手机端不行,你是指PowerServer 2020 or Older 的产品吗?如果你要使用PowerServer 2020 or Older连接MySQL,建议使用Native Driver,具体请参见:

https://docs.appeon.com/2017/server_configuration_guide_for_net/connection_cache_settings_for_mysql_native_driver.html
  1. Helpful
There are no comments made yet.
? ? Accepted Answer Pending Moderation
  1. Sunday, 8 May 2022 02:22 AM UTC
  2. PowerBuilder
  3. # 3

电脑上用这个的可以连接,但我电脑上 进行应用执行:报连接错误

 

 

 

Comment
  1. Ken Guo @Appeon
  2. Monday, 9 May 2022 05:15 AM UTC
你好,你PB代码执行失败的原因是你没有写下面这句代码:

connect using sqlca;

  1. Helpful 1
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.