Forum Discussion
Novari-QA
8 years agoFrequent Contributor
I suggest storing it as JSON. OR use the example i provide below
For example here is some code that will grab the results from a stored procedure using the SQLUtilities Script provided by tristaanogre
var _testData = [];
var queryObject = SQLUtilities.NewQueryObject(
"EXEC [dbo].[Get_TestData] " +
"@TestID = :TESTDATA", {TESTDATA: "4"});
var query = SQLUtilities.NewSQLQuery(queryObject);
query.open();
var record = query.execute();
while (!record.EOF) {
_testData.push([
record.Fields.Item('Row').Value,//0
record.Fields.Item('OrderNum').Value,//1
record.Fields.Item('NumOfParams').Value,//2
record.Fields.Item('FunctionPath').Value,//3
record.Fields.Item('Function').Value,//4
record.Fields.Item('Parameter').Value,//5
record.Fields.Item('ParameterType').Value,//6
record.Fields.Item('Data').Value//7
]);
record.MoveNext();
}
query.closeAndNull;
I take the fields and push them into an array. I hope this helps.
tristaanogre
8 years agoEsteemed Contributor
Nice! I like seeing that utility being used...
Download link in my sig.