1

Konu: FoxyClasses and buffering

I am starting to refresh my knowledge of buffering. Not too difficult a concept, but I was wondering if there is buffering involved in the FxyClasses grid classes?

I did run "TABLEREVERT()", and got a message that buffering was needed, so I assume that no buffering is involved in the FoxyClasses grid classes.

Regards,

Hans L

2

Re: FoxyClasses and buffering

When I include buffering in my "main" file, I still get the error message when using "TABLEREVERT()".

Regards,

Hans L

3

Re: FoxyClasses and buffering

Hans,
LocatorGrid is readonly. No buffering there.
MultiSelectGrid is unbuffered. You may enable buffering but it is readonly in the grid. Behind the scenes only one field is updated. So buffering is not available there (I don't have a use case to be more precise).

Only EditGrid is suitable for buffering and it is already buffered in code.

4

Re: FoxyClasses and buffering

Okay, Cetin, I understand.

Now, regardless, I cannot get "TABELUPDATE() to work.

Here is what I have:

I have grid and data text boxes and edit boxes in the same form. The ControlSource for these boxes are of the type tbtewese.cname (table.field).

In Main file:

Visual Fox Pro
USE tbtewese

SET MULTILOCKS ON
= CURSORSETPROP('Buffering', 5, 'tbtewese' )


In form method btn_Undo, I have

Visual Fox Pro
TABLEREVERT(.F., "tbtewese")


This seems to work.

In form method btn_Save, I have

Visual Fox Pro
TABLEUPDATE(.F., "tbtewese")


Does not work! Error message "Function argument value, type, or count is invalid".

I have tried various arguments, as well as no argument, and nothing works. I have read book chapters and Help files, but nothing tells me what is wrong. (It might be there, but I do not see it.)

My general question is: "What am I doing wrong"?

A specific question is: "Should I have the cursor name as ControlSource for the text and edit boxes?"

Gratefully,

Hans L

5

Re: FoxyClasses and buffering

The parameters are wrong. Second parameter is lForce. ie:

Visual Fox Pro
TableUpdate( 2, .T., "tbtewese" ) && all rows, do not raise error, Force write - last write wins -, update "tbtwese"

6

Re: FoxyClasses and buffering

Missed second part of question:) Not sure I understood clearly. In controlsource always write alias and field. ie:

Wrong:
Company

Right:
Customer.Company

7

Re: FoxyClasses and buffering

Oooops, I read [nRows [, lForce]] as if it said [nRows | lForce], which is, of course, a terrible error on my part. I simply saw it that way at the beginning, and was never able to see it the correct way after that. First impression ...!

The second part was:

A specific question is: "Should I have the cursor name as ControlSource for the text and edit boxes?"

In other words, I was not sure whether or not I needed the *cursor* name in your FoxyClasses' grid class in the Control.Source. I now know that the table name is okay.

Thank you very much for your help.

Regards,

Hans L

8

Re: FoxyClasses and buffering

In Foxyclasses grids class. There the recordsource is an SQL with an alias generated at runtime and the column controlsources are implicitly set. We are talking about the same thing I think. A sample would be good.