Hi!
Its depended on the way you "access databases to return a value". There are many approaches in VFP for that. You can use SEEK or LOOKUP or LOCATE and record is changes. You can use SELECT MyField FROM MyAlais WHERE {SearchCondition} INTO ARRAY MyResult, and have a result value in the MyResult variable without any record movement in the osurce alias, and still have the advantage of the search by indexes because Rushmore optimization of the SELECT statement.
HTH.
>Hi VFP users & gurus,
>Whenever, I need to write UDF that needs to access databases to return a value, I find it a chore to have to remember the record pointers and tags which need to be reset before exiting the function. I couldn't use private data session bcos the function maybe used in a SQL select involving thousands of records and each call will create a data session. Could you offer some advice in this area as I find my way of coding cumbersome.
>
>Best Regards
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.