Converting OracleDataset to OracleQuery

d4jaj1

Member²
Hello,

I'm trying to convert some code I was using as part of an OracleDataset to OracleQuery for performance reasons. How do I correctly convert this code to the OracleQuery version?

FOR j := ...etc....
if AnsiCompareText(trim(uploadasheets.fields[j + 7].value), trim(GetAnswerKey.Fields[j + 2].value)) = 0 then ..etc...

GetAnswerKey is the OracleDataset I want to convert. I tried FieldName, but I couldn't get it to compile with [j + 2].

Thanks
 
The TOracleQuery is not a TDataSet descendant, and it has some different functions to get to the field data. You can use GetAnswerKey.FieldAsString(j + 2) if GetAnswerKey is a TOracleQuery.

------------------
Marco Kalter
Allround Automations
 
Back
Top