Hello. I have a program that has used ADO database connection to return a query and then subsequently put the query results into an array using getrows. See snippet below:
$constrim="DRIVER={SQL Server};SERVER=xxx-xxxxx\CSC;DATABASE=xxxxxxxxx;uid=xxxxxxxxxx;pwd=xxxxxxxxxxxx;"
$adCN = ObjCreate ("ADODB.Connection") ; <== Create SQL connection
$adCN.Open ($constrim) ;
local $sQuery = "select * from tbl_Apps" ; get all applications in the database
local $oAppRecordSet = $adCN.Execute($sQuery)
local $aAppsInDB = $oAppRecordSet.Getrows(5000)
With the code above I can perform array operations very efficiently.
Now I need to get this data via JSON which is working (using Ward's JSON UDF) but the data set returned is large (approx 4MB) and I'm wondering what is the most efficient way to get this data into an array.
Dim $obj = ObjCreate ("WinHttp.WinHttpRequest.5.1")
$obj.Open("GET", $URL, false)
$obj.SetRequestHeader("Content-Type", "application/json")
$obj.Send()
$json = JSON_decode( $obj.ResponseText )
Any help would be appreciated!!