>If I make a Connection in the VFP DBC, and then make a remote view using that Connection... I'm able to see Tables and Views made inside our SQL Server. So far so good.
>However, if I pick SQL tables, do joins, and then set a parametered filter... where does that work get done? Does that work get done on the client side, or inside the SQL server?
On the SQL Server machine.
>What I see happening is one of 2 things. Either the remote view pushes the SQL code through (including the filter), and SQL does the work sending back only the 1 or so records - that'd be great.
>OR-- the remote view pulls the whole database info over, and then does the filtering locally (bad).
>Does anyone make views inside the SQL server? I'd like to... Easier to maintain and create I think but they don't allow Parameters. So does that mean I should just make them in the remote view section on VFP?
You have a variety of options here. You can use parameterized remote views in the VFP DBC. You can create a view in SQL Server, but you are right, they are not parameterized. Or you can create a stored procedure in SQL Server, pass in some parameters, and use those parameters to build the SQL code in the stored procedure.
There was a huge debate recently on the remote views vs. stored procedures issue here on the UT. Check out
http://fox.wikis.com/wc.dll?Wiki~MoreOnRemoteViews~VFP for more info.
Chris McCandless
Red Sky Software