...
>>Mike,
>>I said no in my porevious reply, but maybe I didn't understand what you're saying:)
>>What myth?
>
>Myth that SQL Server stored procedures are always faster than dynamic SQL.
>
>> I'm saying moving the winAPI declaration outside of generator function would speed up tens of times.
>
>Declare before function and use by function versus declare each time function is called? Absolutely!
>
>> Just location changing wouldn't help much I think.
>
>It may. If the exe is local the functions contained in it would be fast. If the DBC is remote, accessing those functions *should* be slower than if they were in the exe.
Yes, I agree SQL server SP is not always faster.
Yes original function was like:
declare ... in ....
* other VFP code
I was saying if declare line is moved outside and called once before calling this function it'd be way faster.
I thought you were saying in exe even with declaration inside function it'd be faster:)
PS: SPs has other problems like you can't be sure at all times which procedure is running when there are name collisions:)
Cetin