Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buffering
Message
De
20/07/1998 12:35:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00119299
Message ID:
00119319
Vues:
31
>I'm getting an error message that says "function requires row or table buffering mode". In my form init and load I have the following code:
> SET MULTILOCKS ON
> =CURSORSETPROP("Buffering",3)
>It still writes the record though. How do I get rid of the error message?
>
>My next problem is that I'm trying not to write duplicate records. In the click event of my save button, I have the following code
> set order to tag lname
> seek upper(thisform.txtLname.Value + thisform.txtFname.Value)
> if !found()
> append blank
> endif
> =tableupdate()
>the lname index is on upper(lname + fname) What am I doing wrong?
>
>Thanks.
Jane,
With cursorsetprop include alias to be sure you're setting it on correct one.
Second do not use row buffering if you have chance to leave record before tableupdate() decision (row buffering does an implicit tableupdate when you move rec pointer ie: seek()).
* A simple routine that must be enhanced before real usage
* table buffering used
scatter memvar
select cnt(*) from ;
  myTable ;
  where lName+fname == m.lname+m.fname ;
  into array myarray
if type("myarray[1]") = "N" and myarray[1]>0 && Already exists
  tablerevert(.f.,cAlias)
else
  tableupdate(0,.t.,cAlias)   && Doesn't exist so allow new to be inserted
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform