Re: Remote view / cursor oddity
- From: Jack Jackson <jacknospam@xxxxxxxxxxxxxxx>
- Date: Tue, 24 Jan 2006 21:44:04 -0800
Sorry, I don't see what buffering has to do with my problem. These
are remote views to an MS-SQL database. Nothing is being written back
to the database because I am not moving any record pointers and not
doing any TABLEUPDATE().
If nothing is open in the data session, and 'track' is a remote view
INSERT INTO track .....
will open the 'track' remote view and insert a record into it.
If instead the following is executed:
USE track IN 0 ALIAS track_curs
INSERT INTO track .....
now only 'track_curs' is open and the new record has been inserted
into it.
My question is why the INSERT inserts into the 'track_curs' cursor
instead of opening a 'track' cursor and inserting into that.
If instead I do this:
USE track in 0
USE track IN 0 ALIAS track_curs
INSERT INTO track .....
the new record is inserted into 'track' as expected.
On Tue, 24 Jan 2006 18:51:09 -0700, "Fred Taylor"
<ftaylor@xxxxxxxx!REMOVE> wrote:
>If you're using a remote view, there is an implied buffering mode in effect.
>If you move the record pointer in the view, any changes in that record in
>the view will be applied to the "source" table. Tha's the way row buffering
>works. If you don't want any changes to be applied to the source table
>until you're ready to do a TABLEUPDATE(), you'll have to swith to table
>buffering.
Fred
Microsoft Visual FoxPro MVP
"Jack Jackson" <jacknospam@xxxxxxxxxxxxxxx> wrote in message
news:sc7dt19t93mfa8hjhai9369julgfvbtdf1@xxxxxxxxxx
>I just ran into something that I don't understand. VFP 8 SP1,
> although I doubt that matters.
>
> With nothing open in the data environment, open a remote view:
>
> USE track IN 0 ALIAS track_curs
> * At this point 'track_curs' is the only thing open.
>
> * The following statement apparently reads data from track_curs,
> * since when it completes there is no alias 'track' open.
> SELECT * FROM track WHERE ... INTO CURSOR xxx
> * At this point 'track_curs' and 'xxx' are open.
>
> * Likewise, the following statement inserts into track_curs:
> INSERT INTO track .....
>
> If the initial USE is removed, the SELECT will silently open the
> remote view 'track' and leave it open, and the INSERT will insert into
> that remote view, which is the expected behavior.
>
> Is inserting into the alias when the remote view name is used the
> expected behavior? It seems wrong to me.
.
- References:
- Remote view / cursor oddity
- From: Jack Jackson
- Re: Remote view / cursor oddity
- From: Fred Taylor
- Remote view / cursor oddity
- Prev by Date: Re: App focus is lost on startup
- Next by Date: VFP9 Reports from VFP8 reports
- Previous by thread: Re: Remote view / cursor oddity
- Next by thread: Take a VB6'er to lunch!
- Index(es):
Relevant Pages
|