>BTW I wouldn't try to have "migratable" SQL much. IMHO you can't write migratable code for VFP SQL and ANSI SQL at the same time. IOW you need to check your SQL per provider. ie: ISNULL() in SQL server would cover iif(isnull(),,) and nvl() of VFP and further it has case when ... constructs.
The methods of the data class handle the proper syntax for this. So, this shouldn't be an issue. The goal is to get as close as possible to avoiding code changes in the SQL commands when moving from one backend to another.