Dim lnCounter As Integer Dim lcString As String Dim lcKey As String Dim lcModule As String lcString = tcKey lcKey = UCase(tcKey).PadRight(25, " ") lcModule = UCase(tcModule).PadRight(20, " ") For lnCounter = 0 To oData.Count - 1 If oData(lnCounter).Row("Key") = lcKey And oData(lnCounter).Row("Module") = lcModule Then Select Case tnLanguage ' French Case 1 lcString = oData(lnCounter).Row("French") ' English Case 2 lcString = oData(lnCounter).Row("English") End Select Exit For End If Next Return Trim(lcString)That assumes that the data adapter is including a SQL like this:
oData = Framework.VFPSQLAdapterDataView("SELECT UPPER(Key) AS Key,UPPER(Module) AS Module,French,English FROM Message", toForm.lcStartupDirectory)
If I wouldn't put the UPPER() here but would have placed it in the routine, the process time is 4 times slower. It is surprising how sensitive the data process could be slow for such small things as oppose to VFP.