AndrewMozley
Programmer
I am a little confused in my use of tables within VFP, after all these years !
In my old Clipper applications, I would run the application in folder (say) \users\andrew. My tables (e.g. the customer table, XCUST.DBF, with a tag X1CUST.DBF) would be in that folder.
So, at the beginning of my application, I would say something like
USE XCUST INDEX XCUST ALIAS Cus
SELECT Cus
SET ORDER TO TAG X1CUST
(And later on)
SEEK “A001” or something like that
I appreciate that there were no complications of multiple windows and forms.
In my VFP applications I normally include the “USE XCUST ” sequence in my LOAD method. However I notice that if I do not do so, I can still bind (say) Textbox controls to this table by specifying the control source as (e.g.) XCUST.Accno.
So, my question is : If I explicitly open a table in my LOAD method, am I competing in some way with the bound textbox control which can find the table anyway without the benefit of the USE command?
I also noticed that if I include the USE . . . INDEX command, my TableUpdate() commands fail with a warning message that I need to have buffering switched on. This is certainly set as a property of the form (Pessimistic). It seems that I additionally need to issue a CURSORSETPROP() command. Why is the buffering property not applied automatically to tables which I open in the form?
A rather similar question relates to the use of the data environment : If I use the data environment, should I avoid explicitly opening tables in my LOAD method? The matter is slightly complicated because I usually use an Alias (USE XCUST ALIAS Cus). Is this approach compatible with binding controls?
Thanks. Andrew
In my old Clipper applications, I would run the application in folder (say) \users\andrew. My tables (e.g. the customer table, XCUST.DBF, with a tag X1CUST.DBF) would be in that folder.
So, at the beginning of my application, I would say something like
USE XCUST INDEX XCUST ALIAS Cus
SELECT Cus
SET ORDER TO TAG X1CUST
(And later on)
SEEK “A001” or something like that
I appreciate that there were no complications of multiple windows and forms.
In my VFP applications I normally include the “USE XCUST ” sequence in my LOAD method. However I notice that if I do not do so, I can still bind (say) Textbox controls to this table by specifying the control source as (e.g.) XCUST.Accno.
So, my question is : If I explicitly open a table in my LOAD method, am I competing in some way with the bound textbox control which can find the table anyway without the benefit of the USE command?
I also noticed that if I include the USE . . . INDEX command, my TableUpdate() commands fail with a warning message that I need to have buffering switched on. This is certainly set as a property of the form (Pessimistic). It seems that I additionally need to issue a CURSORSETPROP() command. Why is the buffering property not applied automatically to tables which I open in the form?
A rather similar question relates to the use of the data environment : If I use the data environment, should I avoid explicitly opening tables in my LOAD method? The matter is slightly complicated because I usually use an Alias (USE XCUST ALIAS Cus). Is this approach compatible with binding controls?
Thanks. Andrew