Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Buffering
Message
From
20/07/1998 12:35:29
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00119299
Message ID:
00119319
Views:
29
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform