>>When you're using embedded parameters, prefixed by question mark, the text is not merged into the command, but rather into a call to a stored procedure... sort of like this:
>>
>>select * from customers where lastpurchase>?ldDate
>>
>>becomes (something like this... too much hassle to bring up the profiler to catch actual syntax)
>>
>>exec sp_executesql 'select * from customers where lastpurchase>@P1','datetime', '2017-02-08'
>>
>>The 2nd and 3rd parameters become lists in case there were more of them. This way, the contents of the variable can be anything; if not a proper date, well, it will either cause an error or bring zero results - but won't drop any tables or do other mayhem.
>
>You're making my point.
>Look at how much time we spent on this.
>If it had been one platform, it would have been a snap.
On the contrary - if embedded parameters were used from the beginning (yes you can do that on dbfs too), there would be no difference between platforms, at least not in the way of passing parameters and values.
The differences would be everywhere else :). On dbfs you can use any VFP function in a SQL statement and it will just work. Just think of any date or string manipulation. Dang, I even used string subtraction, a feature I guess you didn't even know existed:
select surname - (", "+firstname) as fullname
Try that just for kicks. And then try to do that in TSQL. Add to that the handling of logical values, where TSQL is really thin - it doesn't even have .t. nor .f., and a logical value actually doesn't exist, so
... iif(lField, 'yes', 'no ') as yesno...
becomes
case when lfield=1 then 'yes' else 'no' end as yesno
Conversion between VFP's SQL and TSQL is possible but in a limited way, you have to keep the set of features used to what is available in TSQL, and then perhaps you may have some automated translation from VFP to TSQL, but as soon as you have datefield2-datefield1, you can't expect your translator to know that these are date fields and that it should convert that into datediff(day, datefield1, datefield2). And so on...