Hi,

I have VFP9 running in an network environment. I am using the standard DBF
tables. For example, I have a tablet with 2 fields -> name, description.
Intermittently, when I try to seek a name to locate the description, VFP
returns a blank description no matter what name I seek. Is this a problem
with indexing in a network environment or a program with table buffering?

Thanks

Zoom

Re: Bizzare VFP behavior in network environment by AtoutFox

AtoutFox
Wed Apr 30 01:14:02 CDT 2008

There is absolutely no problem with VFP on a network

Maybe you seek for a key that doesn't exist and depending on your settings
of NEAR (set NEAR ON/OFF) and perhaps EXACT (SET EXACT OFF/ON) you don't any
record corresponding and then get a blank description back.

Regards

François

"Zoom" <keashdoc@hotmail.com> a écrit dans le message de groupe de
discussion : -8ednQVwnZRbaorVnZ2dnUVZ_remnZ2d@comcast.com...
> Hi,
>
> I have VFP9 running in an network environment. I am using the standard
> DBF tables. For example, I have a tablet with 2 fields -> name,
> description. Intermittently, when I try to seek a name to locate the
> description, VFP returns a blank description no matter what name I seek.
> Is this a problem with indexing in a network environment or a program with
> table buffering?
>
> Thanks
>
> Zoom
>
>
>
>

Re: Bizzare VFP behavior in network environment by Olaf

Olaf
Wed Apr 30 01:45:23 CDT 2008

Hi Zoom,

what kind of index did you create?
CDX or IDX?
If IDX this needs to be opened before
you can set order to it and seek in it.

If CDX and it's not the same name as the DBF
the same is true.

In these cases the index can be incomplete,
if that was not taken care of, thus you may
not find what you seek.

Also be aware that VFP seeks case sensitive, as
long as you don't use a collation sequence other
than MACHINE, which is the default.

try this:

* script a) Create an indexed table, add some data
cDir = "\\yourserver\yourshare\"
Create Table sometable (name c(20), description M)
Index On name Tag xName
Insert Into sometable Values ("zoom","take a detailed look")
Insert Into sometable Values ("Zoom","foxpro expert")
Use

* script b) seek in the table
cDir = "\\yourserver\yourshare\"
Select 0
Use (cDir+"sometable") in 0
Set Exact Off
Set Near Off
Seek "zoom"
If Found()
? sometable.description
Endif
If Seek("Zoom")
? sometable.description
Endif

Bye, Olaf.

Re: Bizzare VFP behavior in network environment by Olaf

Olaf
Wed Apr 30 01:52:20 CDT 2008

> * script b) seek in the table
> cDir = "\\yourserver\yourshare\"
> Select 0
> Use (cDir+"sometable") in 0
one very important thing missing here:
Set order to xName
> Set Exact Off
> Set Near Off
> Seek "zoom"
> If Found()
> ? sometable.description
> Endif
> If Seek("Zoom")
> ? sometable.description
> Endif

Bye, Olaf.

Re: Bizzare VFP behavior in network environment by David

David
Wed Apr 30 03:16:31 CDT 2008

Try this:

INDEX ON UPPER(Name) TAG xName

Then SEEK("ZOOM")

Hope this helps.
Cheers
David

"Olaf Doschke" <olaf.doschke@t-aufderlinie.de> wrote in message
news:8D8AC332-AFA4-42F7-80A9-C6D7B6B21405@microsoft.com...
>> * script b) seek in the table
>> cDir = "\\yourserver\yourshare\"
>> Select 0
>> Use (cDir+"sometable") in 0
> one very important thing missing here:
> Set order to xName
>> Set Exact Off
>> Set Near Off
>> Seek "zoom"
>> If Found()
>> ? sometable.description
>> Endif
>> If Seek("Zoom")
>> ? sometable.description
>> Endif
>
> Bye, Olaf.



Re: Bizzare VFP behavior in network environment by Olaf

Olaf
Wed Apr 30 03:31:00 CDT 2008

> INDEX ON UPPER(Name) TAG xName
>
> Then SEEK("ZOOM")

I don't know if that is really the problem.

But you could also
SET COLLATION TO "GENERAL"
INDEX ON Name TAG xName
and then
SEEK("ZOOM")
or
SEEK("zoom")

But in my example, this would rather be
contraproductive, as you then would always
find the first zoom or Zoom or ZOOM
or zOOm or however that would be written.

Bye, Olaf.



Re: Bizzare VFP behavior in network environment by Zoom

Zoom
Wed Apr 30 07:35:05 CDT 2008

I am using CDX files but this problem occurs randomly and only in a network
environment. If I use it on single-user machine without other users
connected to the databases, it works fine.

Zoom


"Olaf Doschke" <b2xhZi5kb3NjaGtlQHNldG1pY3MuZGU@strconv.14.de> wrote in
message news:%23COO51pqIHA.3804@TK2MSFTNGP02.phx.gbl...
>> INDEX ON UPPER(Name) TAG xName
>>
>> Then SEEK("ZOOM")
>
> I don't know if that is really the problem.
>
> But you could also
> SET COLLATION TO "GENERAL"
> INDEX ON Name TAG xName
> and then
> SEEK("ZOOM")
> or
> SEEK("zoom")
>
> But in my example, this would rather be
> contraproductive, as you then would always
> find the first zoom or Zoom or ZOOM
> or zOOm or however that would be written.
>
> Bye, Olaf.
>



Re: Bizzare VFP behavior in network environment by Dan

Dan
Wed Apr 30 10:41:48 CDT 2008

That certainly is bizarre and runs counter to everything I've always seen.

Since you menioned buffering, I *have* to ask the "is there gas in the car?"
question: are you trying to seek() values entered by another user but not
yet committed with tableupdate()? You'll never be able to seek those values
until they've been committed because they only exist in the buffer on the
workstation that entered them.

Dan

Zoom wrote:
> Hi,
>
> I have VFP9 running in an network environment. I am using the
> standard DBF tables. For example, I have a tablet with 2 fields ->
> name, description. Intermittently, when I try to seek a name to
> locate the description, VFP returns a blank description no matter
> what name I seek. Is this a problem with indexing in a network
> environment or a program with table buffering?
> Thanks
>
> Zoom



Re: Bizzare VFP behavior in network environment by Al

Al
Wed Apr 30 15:49:23 CDT 2008

I have seen this behavior once in a complicated program with
many users
It happened only occasionally
I was never able to figure out why (I think some interrupt
was in effect)

In any case, to solve I did this

=seek(something)
if found() and expr<>something
=seek(something)
endif

can you say "kludge"

al

"Zoom" <keashdoc@hotmail.com> wrote in message
news:-8ednQVwnZRbaorVnZ2dnUVZ_remnZ2d@comcast.com...
> Hi,
>
> I have VFP9 running in an network environment. I am using
> the standard DBF tables. For example, I have a tablet
> with 2 fields -> name, description. Intermittently, when I
> try to seek a name to locate the description, VFP returns
> a blank description no matter what name I seek. Is this
> a problem with indexing in a network environment or a
> program with table buffering?
>
> Thanks
>
> Zoom
>
>
>
>



Re: Bizzare VFP behavior in network environment by Olaf

Olaf
Fri May 02 08:37:59 CDT 2008

Hi Zoom,

well in general there can be 3 reasons why you
don't find a record from a SEEK() with a key
value, that is guaranteed to be found in the table,

a) the value is not yet in the table but only in
a local buffer not yet committed to the table

b) the index is a secondary cdx or idx which
is only updated by operations on the table, if
the use of the table also always opens this
secondary index files

c) the cdx is corrupt

Bye, Olaf.

Re: Bizzare VFP behavior in network environment by MikeA

MikeA
Tue May 06 00:15:22 CDT 2008

In addition, it could be any of the following:

1. Write Cache on the network drive should be disabled.

2. Check the SET PATH since maybe there are duplicate CDX or dbf files in
different places.

3. Delete the FoxUser resource files.

4. Reindex.

5. Check timers and any "on error" processing since maybe there is an error
being generated but you are not seeing status of the error if you have
something like on error m.llErr = .t.

6. I too have seen this behavior in small tables when they are opened in
multiple datasessions. VFP holds the data in a buffer when the table is
opened in multiple datasessions. But, I have only seen this in small tables
and it's easily cured when there is either an rlock (from any datasession or
workstation) as well as just closing the table.

I think we would need to see some of your VFP code in the method or
procedure to get more ideas.

Mike


"Al Marino" <almarino_AT_intelliform.net> wrote in message
news:eSUVtOwqIHA.3960@TK2MSFTNGP02.phx.gbl...
>I have seen this behavior once in a complicated program with many users
> It happened only occasionally
> I was never able to figure out why (I think some interrupt was in effect)
>
> In any case, to solve I did this
>
> =seek(something)
> if found() and expr<>something
> =seek(something)
> endif
>
> can you say "kludge"
>
> al
>
> "Zoom" <keashdoc@hotmail.com> wrote in message
> news:-8ednQVwnZRbaorVnZ2dnUVZ_remnZ2d@comcast.com...
>> Hi,
>>
>> I have VFP9 running in an network environment. I am using the standard
>> DBF tables. For example, I have a tablet with 2 fields -> name,
>> description. Intermittently, when I try to seek a name to locate the
>> description, VFP returns a blank description no matter what name I seek.
>> Is this a problem with indexing in a network environment or a program
>> with table buffering?
>>
>> Thanks
>>
>> Zoom
>>
>>
>>
>>
>
>