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
>
>>
>>Luis;
>>
>>You can use SQLPrepare() which is compiled for faster execution, before using SQLEXEC( ). You can also use SQLEXEC( ) by itself, which will work but you may loose a bit of speed. You can try both techniques and see if there is any real difference in your application.
>>
>>Tom
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.