Alaska Software Inc. - DacSqlStatement - :query(USQL_RESULT_ARRAY, @aRes) doesn't work
Username: Password:
AuthorTopic: DacSqlStatement - :query(USQL_RESULT_ARRAY, @aRes) doesn't work
Itai DishonDacSqlStatement - :query(USQL_RESULT_ARRAY, @aRes) doesn't work
on Thu, 26 Feb 2015 20:24:32 +0100
Hi,
the following code do not return any value in the array passed to it.

  aRes := {}
  
  DbeLoad("pgdbe")
  DbeSetDefault("pgdbe")

  cConnStr := "DBE=pgdbe;server=localhost;"
  cConnStr += "db=mdidemo;uid=postgres;pwd=postgres"

  oSession := DacSession():New(cConnStr)
  IF(!oSession:IsConnected())
    MsgBox("Connection failed ("+Var2Char(oSession:GetLastMessage())+")")
    QUIT
  ENDIF

  str := "Select * From Customer"
  oStmt := DacSqlStatement(oSession):fromChar(str)
  oStmt:build()
  oStmt:query(USQL_RESULT_ARRAY, @aRes)

Result: aRes = {}

Note: The data does exist in the workarea but there is no sense of a do 
while loop to read it to an array if the functionality exist after all we 
are trying to get rid of all this extra coding with SQL

Thank you
itai dishon
Itai Dishonnotifications
on Thu, 26 Feb 2015 20:25:58 +0100
Rick GreenRe: DacSqlStatement - :query(USQL_RESULT_ARRAY, @aRes) doesn't work
on Thu, 30 Apr 2015 17:34:23 +0200
Any new info on this?
Rick GreenRe: DacSqlStatement - :query(USQL_RESULT_ARRAY, @aRes) doesn't work
on Fri, 08 May 2015 16:11:23 +0200
Rick Green wrote in message news:6a23e2bb$51960046$a792b@news.alaska-
software.com...
>Any new info on this?

I'm wondering if this forum is monitored.
Rick GreenRe: DacSqlStatement - :query(USQL_RESULT_ARRAY, @aRes) doesn't work
on Fri, 08 May 2015 16:17:35 +0200
I found something here: http://news.alaska-software.com/readmessage?
id=%3C18e5e5f$64531ca7$7d72@news.alaska-
software.com%3E&group=#%3C18e5e5f$64531ca7$7d72@news.alaska-
software.com%3E

Apparently Select INTO ARRAY does not work on remote connections


Itai Dishon wrote in message news:1fc7ab3$6c9d61b1$226a37@news.alaska-
software.com...
>Hi,
>the following code do not return any value in the array passed to it.
>
>  aRes := {}
>  
>  DbeLoad("pgdbe")
>  DbeSetDefault("pgdbe")
>
>  cConnStr := "DBE=pgdbe;server=localhost;"
>  cConnStr += "db=mdidemo;uid=postgres;pwd=postgres"
>
>  oSession := DacSession():New(cConnStr)
>  IF(!oSession:IsConnected())
>    MsgBox("Connection failed ("+Var2Char(oSession:GetLastMessage())+")")
>    QUIT
>  ENDIF
>
>  str := "Select * From Customer"
>  oStmt := DacSqlStatement(oSession):fromChar(str)
>  oStmt:build()
>  oStmt:query(USQL_RESULT_ARRAY, @aRes)
>
>Result: aRes = {}
>
>Note: The data does exist in the workarea but there is no sense of a do 
>while loop to read it to an array if the functionality exist after all we 
>are trying to get rid of all this extra coding with SQL
>
>Thank you
>itai dishon
Itai DishonRe: DacSqlStatement - :query(USQL_RESULT_ARRAY, @aRes) doesn't work
on Wed, 27 May 2015 21:16:08 -0700
Rick,
Thank you for the link.
This post is from Aug 12 2013 that was a 2.0 preview more then a year before 
the actual release.
It seems to me like enough time to address this issue.

Itai Dishon



"Rick Green" wrote in message 
news:71de5ed2$5550e9e$46842@news.alaska-software.com...

I found something here: http://news.alaska-software.com/readmessage?
id=%3C18e5e5f$64531ca7$7d72@news.alaska-
software.com%3E&group=#%3C18e5e5f$64531ca7$7d72@news.alaska-
software.com%3E

Apparently Select INTO ARRAY does not work on remote connections


Itai Dishon wrote in message news:1fc7ab3$6c9d61b1$226a37@news.alaska-
software.com...
>Hi,
>the following code do not return any value in the array passed to it.
>
>  aRes := {}
>
>  DbeLoad("pgdbe")
>  DbeSetDefault("pgdbe")
>
>  cConnStr := "DBE=pgdbe;server=localhost;"
>  cConnStr += "db=mdidemo;uid=postgres;pwd=postgres"
>
>  oSession := DacSession():New(cConnStr)
>  IF(!oSession:IsConnected())
>    MsgBox("Connection failed ("+Var2Char(oSession:GetLastMessage())+")")
>    QUIT
>  ENDIF
>
>  str := "Select * From Customer"
>  oStmt := DacSqlStatement(oSession):fromChar(str)
>  oStmt:build()
>  oStmt:query(USQL_RESULT_ARRAY, @aRes)
>
>Result: aRes = {}
>
>Note: The data does exist in the workarea but there is no sense of a do
>while loop to read it to an array if the functionality exist after all we
>are trying to get rid of all this extra coding with SQL
>
>Thank you
>itai dishon