thx, David. That was what i'm looking for.
- Log in to post comments
thx, David. That was what i'm looking for.
thanks!
Hey Robert,
on Point. Thats helps me a lot increasing the selectivity.
Thanks!
Hey Robert,
thanks for the answer, but i dont think it resolve my Problem.What Happens After That 10 Minute Periode when I make 3 parallel calls with the Invalid Session?
Maybe the User is 2 Hours away (in This time the Session Timed out and also the Grace Time) Then the User cames back change the Page where are called 3 parallel request to csp. I think it will take 3 licenses.
Hey Robert,
thanks for the fast answer. Do you know if it's possible to delete these global buffers?
So I can reproduce that problem again and again. It would be much easier to find out, what makes the request so slow.
Solution:
First thanks for your help!
Now I wrote my own class to get JSON direclty from SQL with custom keys declared with as in SQL:
ClassMethod GetArrayFromSQL(pVar As %String = "", pSQL As %String = "") As %Library.ListOfDataTypes
{
#dim parameter = 0
for {
set value=$piece(pVar,"#",$increment(parameter))
if ( value = "" ) { quit }
set parameter(parameter) = value
}
set parameter = parameter - 1
#dim list = ##class(%Library.ListOfDataTypes).%New()
#dim tStatement = ##class(%SQL.Statement).%New()
#dim tStatus = tStatement.%Prepare(pSQL)
#dim tResult = tStatement.%Execute(parameter...)
#dim columnCount = tResult.%ResultColumnCount
while( tResult.%Next() ) {
set offsetName = -8
set object = ##class(%ZEN.proxyObject).%New()
for i = 1:1:columnCount {
set newKeyName = $list(tResult.%Metadata(0),$increment(offsetName,10))
set command = "set object.%data("_$char(34)_newKeyName_$char(34)_") = tResult."_newKeyName
xecute command
}
do list.Insert(object)
}
return list
}Best regards
Hey,
thanks for your quick answers.
I found the following solution for my problem and it works:
.png)
But now I'm not protected against SQL-Injection, because customer is dynamic input from the client.
How I can I use this safe? Can I use something like parameterized queries? And how?
Best regards.
Hey Robert,
thanks for your fast answer. I edited my Question, so I have Caché 2013.1 and can't update now.
The solution ist what i need, but can I use with my version?
And can I use it with SQL like in my example or should I use SQL-Statement?
Hey Vitaliy,
It works! Very smart solution to create your own custom class.
You helped me so much, thank you!
Best regards.
Hi Evgeny!
Very helpfull, thanks.