Find

Digest
· Aug 12, 2024

Nuevas publicaciones en la Comunidad de InterSystems, 5-11 agosto

5-11 agostoWeek at a GlanceInterSystems Developer Community
Question
· Aug 12, 2024

Error querying foreign table on MySQL

Hi community members!

I'm testing some functionalities about Foreign Tables and it works smoothly with PostgreSQL database, but I found out an issue with MySQL database, I followed the documentation:

  • Step 1: I've created my SQL Gateway connection to my MySQL database: **WARNING** if the name of the driver file is too long IRIS won't be able to get it.

  • Step 2: Create foreign server:
    CREATE FOREIGN SERVER Test.MySQLDB FOREIGN DATA WRAPPER JDBC CONNECTION 'MySQL'
  • Step 3: Create foreign table:
    CREATE FOREIGN TABLE Test.PatientMySQL SERVER Test.MySQLDB TABLE 'patient'
  • Step 4: Query Test.PatientMySQL:
    SELECT * FROM Test.PatientMySQL

And this is the error:

[SQLCODE: <-230>:<Foreign table query Execute() failed>]

[%msg: <Foreign Tables - ERROR #8104: Gateway Exception: <GATEWAY> java.sql.SQLSyntaxErrorException com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:112) Remote database reported error: 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 '"patient" T1' at line 1>]

As you can see, the problem is the double quotation used on the query for the table name that IRIS is executing, MySQL doesn't recognize it and throws the error, I've checked the driver and the MySQL versions and they match, version 9.

Is this a bug? Is it a misconfiguration?

Thank you in advance!

4 Comments
Discussion (4)1
Log in or sign up to continue
Digest
· Aug 12, 2024

【週間ダイジェスト】 8/05 ~ 8/11 の開発者コミュニティへの投稿

Article
· Aug 11, 2024 2m read

第七章 解析时使用进程私有全局变量

第七章 解析时使用进程私有全局变量

默认情况下, Web 客户端在解析请求或响应时通常使用本地数组内存。可以强制它改用进程私有全局变量;这使 Web 客户端能够处理非常大的消息。

为此,请指定 Web 服务类的 USEPPGHANDLER 参数,如下所示:

Parameter USEPPGHANDLER = 1;

如果此参数为 1,则 Web 客户端在解析请求或响应时始终使用进程私有全局变量。如果此参数为 0,则 Web 客户端始终使用本地数组内存来实现这些目的。如果未设置此参数,则 Web 客户端使用默认值,通常是本地数组内存。

可以在运行时覆盖此参数。为此,请设置 Web 客户端实例的 UsePPGHandler 属性。

Discussion (0)1
Log in or sign up to continue
Article
· Aug 10, 2024 2m read

第六章 定义单向 Web 方法

[toc]

第六章 定义单向 Web 方法

通常,当 Web 客户端调用 Web 服务时,会返回 SOAP 消息,即使该方法没有返回类型并且在 数据平台中执行时不返回任何内容。

在极少数情况下,可能需要将 Web 方法定义为单向的。此类方法不得返回任何值,并且消息不需要 SOAP 响应。

注意:通常不应使用单向方法。请求-响应对更为常见、更受支持且更受期待 — 即使对于没有返回类型的方法也是如此。

要定义单向 Web 方法,请将该方法的返回类型定义为 %SOAP.OneWayWSDL 未定义此 Web 方法的输出,并且 Web 服务不返回 SOAP 消息。

Discussion (0)1
Log in or sign up to continue