Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to 'Add' a record?
Message
From
19/12/2000 14:52:04
 
 
To
19/12/2000 14:41:20
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00454759
Message ID:
00455162
Views:
33
>>
CURSORSETPROP("Buffering",3,0)
>>
>>You can do this in whatever you're beginning code does. Otherwise, you'd have to issue your CURSORSETPROP() after each table/cursor is opened.
>
>This is what is in my MAIN.PRG, is this correct? As I said before, I am not familiar with where to put those new codes (since FPW 2.6).
>And then what do I put in the *Click Event* of 'Add' or 'Edit'? I have not even program anything for the *Esc* key to do TableRevert().
>
>SET EXCLUSIVE OFF
>SET DELETED ON
>SET MULTILOCKS ON
>SET SAFETY OFF
>*SET ESCAPE OFF
>
>USE dirpath
>STORE dirpath TO dirpath
>SET DEFAULT TO &dirpath
>USE
>
>CURSORSETPROP("Buffering",3,0) <------------------------------------- is that correct place?
>LOCAL laTables, lcTableName, lcKey
>OPEN DATABASE data
>DIMENSION laTables[1]
>ADBOBJECTS(laTables, "TABLE")
>FOR EACH lcTableName IN laTables
> USE (lcTableName) IN 0
> SELECT (lcTableName)
> SET ORDER TO main
>ENDFOR
>
>SELECT person
>GO TOP
>*SET RELATION TO id INTO auth
>
>DO mainmenu.mpr
>READ EVENTS

As long as you're not using Private DataSessions, that will work. If you're using Private DataSessions, you'll need to put the CURSORSETPROP in your form's Load method as it is scoped to your DataSession, or in your BeforeOpenTables if you're using the DataEnvironment.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform