PMFJI,
If your query uses GROUP BY (with where condition Rushmore optimizable) where the processing is done?
>The all processing is done on workstation (WS) regardless if you're accessing VFP tables directly or through ODBC/ADO. If your query is not Rushmore optimizable, than the whole table has to be transfered to WS for processing. If query is optimizable, than first appropriate part of index(es) will be transferes to WS to determine what records to return and only requested records will be transfered to WS.
>
>>
>>Our new IT manager asked me a question that I could not 100% honestly answer. According to him, when I do a simple SQL statement through the VFP ODBC, the entire table is transfered to the client and evaluated there and the result set in placed into the cursor. In the following simple querry I want just 1 record/field. I have always assumed that what I get returned to the calling EXE is just that.
>>
>>
lcSqlStatement = "SELECT PROJ.Proj_No " + ;
>> "FROM PROJ " + ;
>> "WHERE PROJ.Seg_Cd + ALLT(PROJ.User_Proj_No) == 'G15164' " + ;
>> "ORDER BY PROJ.Proj_No"
>>
>>lnHandle = SqlExec( gnSatHandle, lcSqlStatement, 'Proj_Num_Cursor' )
>>
>>Could someone please clairify this for me.
>>
>>TIA
>>Mike
>>
>>VFP6 SP5 VFP-Database
If it's not broken, fix it until it is.
My Blog