Original Message:
Sent: Mon August 25, 2025 04:11 PM
From: Rex Chan
Subject: JDBC adapter in ITX
This one works (the URL has changed to a different DB but the important thing is the SQL Stmt).
=PARSE(VALID(GET("JDBC","-URL jdbc:sqlserver://localhost:1433;databaseName=support;user=sa;password=SQLadmin1;encrypt=true;trustServerCertificate=true -QRY ""select Id,Value from dbo.ReportMetadata where Value like 'v%'"" -TV+ m4jdbc.mtr ",PACKAGE(InputParams:TargetTableKeys)),FAIL(LASTERRORMSG())))
------------------------------
Rex Chan
Original Message:
Sent: Mon August 25, 2025 08:43 AM
From: Santanu Baral
Subject: JDBC adapter in ITX
Thanks Rex
replacing single quote with double quote works for simple conditions but still not recognizing wild character like %.
Thanks for your help
------------------------------
Santanu Baral
Original Message:
Sent: Fri August 22, 2025 12:35 PM
From: Rex Chan
Subject: JDBC adapter in ITX
This is what I used for mysql database.
=PARSE(VALID(GET("JDBC","-URL jdbc:mysql://testserver:3306/testdb?verifyServerCertificate=false&useSSL=false&serverTimezone=UTC -USR testuser -PWD testpassword -QRY ""SELECT c1,c2,c3 FROM testtable WHERE c1=?"" -TV m4jdbc.mtr -QTY 1 -LSN 0 -AS 0",PACKAGE(InputParams:TargetTableKeys)),FAIL(LASTERRORMSG())))
I suggest not using % to start with and get the syntax working first. The URL probably is different from yours. Look for the trace file (m4jdbc.mtr) to see if it can help.
------------------------------
Rex Chan
Original Message:
Sent: Fri August 22, 2025 03:42 AM
From: Santanu Baral
Subject: JDBC adapter in ITX
Hi,
I am getting error and in somecases trace file not even getting generated while i am using the below query. i am using oracle jdbc driver to connect.
GET("JDBC","-URL <URL> -USER <id> -PASSWORD <pwd> -TV -AS 0 -QTY * -LSN 0 -QUERY 'select * from employee where employeeid='1' ' ")
select * from employee where employeeid='1'
no trace is being generated for the above query and when i have changed the query by removing single quote like below then getting error as "missing expression".
select * from employee where employeeid=1
same type of issues for the below query as well. its not able to recognize %
select * from employee where employeename like 'A%'
is there any way to resolve this?
Thanks
Santanu
------------------------------
Santanu Baral
------------------------------