How to get a Database table into an object (2D Array may be), and read the data
Hello,
I'm running a UI tests which fetches data continuously from a DB table. This table has 10000 rows and 20 columns.
Test continuously fetches the data, and uses if for modifications, and many column values get updated. It goes thru three iterations, and in each iteration column values get changed.
The problem I'm facing: The way I'm fetching these values in an object takes significant time(~ 2 hours) to get all these values into an object (10000 rows x 20 Columns = 200,00 cells) because each value is being fetched individually.
What I really need help with is, a way to fetch the whole data table into an object (may be an array), and then be able to read each cell(row, column) value buy using the combination of columnname and row Indicator e.g. Column_Name.row[0] and also much quicker(Within 5 minutes range).
The records fetched from this snippet are being pushed into another array to have a table like object.
function dbRecordToObject(record) {
var returnValue = {};
try {
if(!record.EOF) {
for(var i = 0; i < rec.Fields.Count; i++ ) {
returnValue[record.Fields.Item(i).Name] = record.Fields.Item(i).Value == null ? "" : aqString.Trim(record.Fields.Item(i).Value);
}
}
else {
Log.Warning("Empty record set");
}
}
catch(err) {
Log.Warning("Error : " +err.message);
}
finally {
return returnValue;
}
}
Any help would be appreciated!
Thank you
Al2
are you still having issues with this? Can you confirm that you have changed the Resource Path, as well as just the Operation Name. Is it possible to post up the project?