Re: Sql Server Question
From: Fred Taylor (ftaylor_at_mvps.org!REMOVE)
Date: 08/02/04
- Next message: turiya36: "RE: _Screen.Image"
- Previous message: Cowboy: "Tables with buffering"
- In reply to: Shahriar: "Re: Sql Server Question"
- Next in thread: David Younger: "Re: Sql Server Question"
- Reply: David Younger: "Re: Sql Server Question"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 1 Aug 2004 17:01:02 -0700
You're missing the point of what the function of a view is. A view's
function is not to bring over all the records from the backend's data. It's
purpose is to bring over as small a subset as you need to work on, the
smaller the better. When you retrieve records from the backend, the
backend's indices are used, but once the records are brought over and made
into a local cursor for your view, they no longer come into play as
everything as now in VFP and is not in the backend at all anymore. The only
times the backend indices will come into play again is when you update the
records in your view and do a TABLEUPDATE to find the record (not LOCATE)
in the backend data.
If you need to massage all the data from the backend, you'll need to have
some sort of index that will allow you to move through your data in some
sort of sequential manner, either1 record at a time, or in some kind of
logical block of records.
Fred
Microsoft Visual FoxPro MVP
"Shahriar" <HelloShahriar@hotmail.com> wrote in message
news:XkePc.1234$%e2.1027@nwrddc04.gnilink.net...
> My question was related to setting views in a SQL table from foxpro and
then
> issuing a Set filter and/or locate command on the remote data. Once the
set
> view has been established, how can one access the SQL table to move the
> record pointer to a selected record without doing a sequential search !
i.e.
> is there a way to make use of the indexes in SQL database at all ?
>
>
> "turiya36" <turiya36@discussions.microsoft.com> wrote in message
> news:9C6262A2-999B-4AFA-8AB7-B500C0346194@microsoft.com...
> > SQL Server doesn't have seek, locate or set filter commands.
> >
> > You need to access SQL server (via ODBC or OLEDB) with a SQL statement.
> You can do this by creating views or with SQL passthrough.
> >
> > Once you execute the SQL statement (or put your view in use) you would
> then have a cursor that you can manipulate just like a normal VFP cursor.
> >
> > -turiya36
>
>
- Next message: turiya36: "RE: _Screen.Image"
- Previous message: Cowboy: "Tables with buffering"
- In reply to: Shahriar: "Re: Sql Server Question"
- Next in thread: David Younger: "Re: Sql Server Question"
- Reply: David Younger: "Re: Sql Server Question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|