how to get php multiple result sets object into Extjs store? - extjs

sql server stored procedure returns multiple result sets into php where I am formatting into a 2 dim array so as to get results returned as single object for extjs store callback.
sets[[{"field1": 1, "field2": 2}], [{"field3": 3, "field4": 4}]]
Cannot find any examples of how the extjs.store.proxy.reader can handle this. These result sets are not associated so do not think the associated model stuff will help. I can obviously format the php return var anyway, but thought a single array containing the multiple result sets would be a good start. We have single result sets working fine by specifying correct rootProperty in store.

Related

What type of datastructure is this: a:114:{s:12:"notification";a:1:{i:0;a:5:{s:8:"email_to";s:24

I'm working with a Wordpress database and want to create some reports on the data. One of the tables contain information which is stored in this format:
a:201:{s:16:"arfmainformwidth";s:3:"550";s:15:"form_width_unit";s:2:"px";s:8:"edit_msg";s:39:"Your submission was successfully saved.";s:12:"update_value";s:6:"Update";s:12:"arfeditoroff";b:0;s:19:" ....}
What I figuered out is that the first letter is the datatype: a = array, s = string ... and the second value is the length.
I saw this format in different other tables from other plugin and want to know how is it called or if there's any type of function which can parse this data. I don't even know how it's called.
I'm working with Wordpress and ARForms. Caldera Forms include this data aswell.
your help would be appreciated
This is the serialized representation of an array. You should be able to unserialize it by calling unserialize() on the string above. This is mostly used when you want to persist a temporary state of an object or you don't want to create database table structures for each and every bit of information.
More to find here:
https://www.php.net/manual/de/function.serialize.php
https://www.php.net/manual/de/function.unserialize.php

Swif'ts Array to Realm's Result

I am trying to convert Swift [Object]() array to Realm's Results<Object>!. I know that vice-versa is possible (you can see here) but is it possible to do what I want?
So I want something like result as! [Object].
Result objects are proxies for data stored in the db. You can only get them via queries, but cannot instantiate them yourself (see the docs).
To still get Result objects, you'd have to run a new query for the objects you already have, and use the returned Result... I would not suggest that though.

SQL Server: How to Get Large amount of JSON from Store Procedure

I've created one store procedure that returns the JSON. But it not return complete JSON only limited JSON returned. I used "For JSON auto" after Select statement. Have any Solution to get all JSON?
if you are using any Cast or covert operations. Use VARCHAR(MAX) instead of VARCHAR().
I have seen this issue in such cases.
Also if you are using the print output, then it is possible that the text might get truncated, but you can use the Select or Output parameter instead.
make the output parameter of type nvarchar(max)
or check this link :
Format Query Results as JSON with FOR JSON (SQL Server)
This might help
I found my solution here: https://learn.microsoft.com/en-us/sql/relational-databases/json/format-query-results-as-json-with-for-json-sql-server?view=sql-server-ver15#output-of-the-for-json-clause (same as above, but a specific section)
The issue was that I thought SQL Server was returning a single row/cell of JSON data because that is how SSMS displayed it. The truth is that it chops it into multiple rows.
I was retrieving the data in .NET using ExecuteScalar(), but I needed to use ExecuteReader(), and concatenate all rows together. Once I did that, I could deserialize the JSON without issue.

VB.Net - Excel application get showing values of an range

I'm trying get an Excel Range and copy into an array of objects with Vb.Net.
This is not a problem. I use the following code:
Dim vValues(,) As Object = ExcelApp.Range(vRange).Value
And works fine; but I have a the following case:
In the column "C"; the value has a specific format and internally has another value.
My question is:
Somebody know the way to get the information exact as the user see?
I'm trying to get the information without use a For ... Each or some kind of cycle.
I'm also tried to avoid use "text to columns" function.
Both seems right solutions, but would impact the performance with a lot of data.
FYI: Also I can get the information through the ODBC connection; but I'm searching the solution using a Range
Exactly what the user sees is the Text property. But you cannot have an array of that, you will have to query each cell individually.
You are getting a Double value in your array instead of a DateTime value because you have "Time" formatting applied in Excel. If you had a format from the "Date" category, Excel would instead send a proper Variant/Date, not a Double that represents it.
Another option would be constructing the DateTime objects on the .NET side, provided you know in which columns they should be.

How to read database (JDBC Request) result into variables in Jmeter

I want to read Database result into variables so I can use it for later requests.
How can i do it?
What if i want to return from database multiple
columns, or even rows? can loop the returned table same way i can
with "CSV Data Set Config"?
--edit--
Ok, i found this solution that uses regular expression to parse the response, but this solution and other like it doesn't work for me, because they require me to change SQL queries so Jmeter could parse them more "easily". I'm using Jmeter to do testing (load testing), and the last thing I want is to maintain 2 different codes, one for "testing" and other for "runtime".
Is there a "specific" JDBC Request solution that enable me to read result into variables using the concept of result-sets and columns?
Using The Regular Expression shouldn't affect what your SQL statement looks like. If you need to modify which part of the response you store in variable, use a Beanshell sampler with java code to parse out the response and store into a variable.
You can loop through the returned table, by using a FOREACH controller, referencing the variable name in the reg ex. Make sure in your reg ex, you set the match value to -1 to capture every possible match.

Resources