Hi!
Just test it. I guess you should not use it for default, becuase fo little query it can slow down things because more requests to SQL Server through network and ODBC.
>Thanks for the explanation. Now I understand it should be used in every complex query. But, don't you think it is something that should be ON by default? In the other hand I always create views with SHARED checked ON.
>
>Thanks a lot!!
>
>
>Luis
>
>
>
>>Hi!
>>
>>Assume you have a complex lookup query without or with parameters. You use this query on several forms by opening the same view with different parameters on different forms. Without pre-compiling, each time VFP send view's query to the server backend, server backend should compile that query before executing to prepare an internal code for interpreter to execute that query. This compiling takes some time. When you execute that query many times on many places, this time used for pre-compiling will count on each such query.
>>
>>Some backends, like SQL Server, have a feature for this - application can send a single command with query to pre-compile the query string. Then each time query is executed, backend will not compile it, it will use already compiled code.
>>
>>This is theoretically how work SQLPrepare() command ()prepare SQL command) and SQLEXEC() command (execute a query on remote backend). I do not know really if this option works for remote views, accordingly to help it should work. Though I suspect, in case SHARED option is used for remote views, when you open another view, pre-compiled code lost because another query executing. Anyway, SHARED option is recommended to use ecause it saves number of connections to SQL Server.
>>
>>Hope this makes it more clear for you...
>>
>>>Thanks, but I really need to know what does 'Precompile SQL on backendserver' means. It is in the View Desginer's Advanced Options. And please, show me a real-world example if possible.
>>>
>>>Thanks any way.
>>>
>>>
>>>Luis
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.