Question Javier Lorenzo Mesa · Jul 24, 2024

Hi,

I'm making a request to an API that works perfectly with Postman, you can see it here:

The URL is https://testcds.esriguide.org/v2/session/3189981 where the last part is the ID's session I want to get back.

When I try to make the same request in IRIS I always get a "Bad request" error.
I'm creating the request which all the information needed (or at least that I know):

Method TornaRequestGET() As %Net.HttpRequest

{
Set request = ##class(%Net.HttpRequest).%New()
Set request.SSLConfiguration = "iGUIDE"
Do request.SetHeader("Authentication",..#AuthenticationAPIKEY)
Do request.SetHeader("Accept","appl

2
0 214
Question Javier Lorenzo Mesa · Jun 30, 2016

Hi,

I'm trying to perform a SELECT with parameters using the EnsLib.SQL.OutboundAdapter. The SELECT returns results but seems to discard the parameters I try to send. I have tried two methods.

First:

Set par(1) = "20160630"
Set par(1,"SqlType") = 12
Set sql = "SELECT Cod, Ing, score FROM [bbdd].[dbo].[vw_Test] WHERE MyParam >= '?'"
Set tSC = ..Adapter.ExecuteQueryParmArray(.QueryResultSet,sql,.par)

Second:

Set par(1) = "20160630"
Set par(1,"SqlType") = 12
Set sql = "SELECT Cod, Ing, score FROM [bbdd].[dbo].[vw_Test] WHERE MyParam >= '?'"
Set tSC = ..Adapter.ExecuteQuery(.QueryResultSet,sql,par)

Although

4
0 1412