Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is scatter name loTemp slower than scatter memvar?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00544355
Message ID:
00545255
Vues:
13
Thanks, Marvin. I'll check it. So far it seems to work just fine. I ran it from my machine Windows 95 VFP6 SP4.

>Hello Nadya!
>
>Please check out if the indexseek(m.lcSearchExpr,.t.) runs, because I reported a bug in this function, when using it at the same time from different Clients.
>See...oops...someone deleted my entry in the FAQ.
>Ok...here's the code again.
>
>*Create a Database "test.dbc" on \\Server\Somedirectory\
>*with a
>*table "test" primary_id N(10),record N(4),User C(30),New L
>*index on primary_id
>
>local lnCount, lnPrimary_id, lcNorevert, lcnoupdate,lcUser, lnAppRec,lnWorkArea
>set escape on
>set multilocks on
>set exclusive off
>clear all
>close data all
>wait window "Now run at the same time... 2000 Records"
>open data \\Server\Somedirectory\test.dbc
>use test
>=cursorsetprop("Buffering",5)
>set order to primary_id
>
>lcNorevert = ""
>lcnoupdate = ""
>lcUser = sys(0)
>for lnCount=1 to 2000
> select test
> lnWorkArea=select()
> append blank
> lnAppRec= recno()
> lnPrimary_id = lnCount
> *Trying to get an unique number...somehow
> *Mb This will cause the error...only when the Table is in Use from
> *different Clients at the same time
> do while indexseek(lnPrimary_id, .f., lnWorkArea, "primary_id")
> lnPrimary_id=lnPrimary_id+1
> enddo
>*!* *This is the Code to workaround!
>*!* do while seek(lnPrimary_id) &&, lnWorkArea, "primary_id")
>*!* lnPrimary_id=lnPrimary_id+1
>*!* enddo
>*!* go lnAppRec
> *The RECNO() should always be a negative number, because of
> *cursorsetprop("Buffering",5)
> if recno()>0
> ? "Error in Record#"+str(recno())
> endif
>
> replace Primary_id with lnPrimary_id,;
> record with recno() ,;
> User with lcUser,;
> new with .t.
> if !tableupdate(.t.,.f.)
> ?"No Update : Recno "+str(recno())
> endif
>endfor
>if not empty(lcNorevert)
> =messagebox("Norevert:"+lcNorevert)
>endif
>if not empty(lcnoupdate)
> =messagebox("Noupdate:"+lcnoupdate)
>endif
>
>
>This Code will produce an C00005 Error, when you run it from different Clients, but does run, when you run it from one Client.
>Strange behavior, when using a tablerevert inside code, because the C000005 error will not occur, but the recno() will sometimes be a positive number, which should not be.
>
>I Dont know, wether this error is solved in VFP7?
>I'm using VFP6 SP5.
>I will be surprised, when this runs on your machines.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform