FOUND VFP5.0 GRID BUG - Column not found error 
Author Message
 FOUND VFP5.0 GRID BUG - Column not found error

Hi....

This is what I did : -

        I create a tempory table in FORM1.Command1.click  to my temporary
directory in C: drive using the "copy struct to" command.

        Then I set

                thisformset.FORM2.grid1.column1.controlsource=thetable.thefield
                .
                .
                .                          

then I did a  thisform.hide and thisformset.form2.show.

the first time I click on the command1, no error is return BUT when I
return back to the form1 and click the button again, an error message pops
up saying

        property column1 not found

the error will no go away until I completely quit VFP and start again.

I wonder if this is a BUG in VFP5.0 or is there something wrong with my
method of working ?

Please Advice
Stanley Tan





Sat, 07 Aug 1999 03:00:00 GMT  
 FOUND VFP5.0 GRID BUG - Column not found error


Stanley Tan  said...

Quote:

>Hi....

>This is what I did : -

>        I create a tempory table in FORM1.Command1.click  to my temporary
>directory in C: drive using the "copy struct to" command.

>        Then I set

>thisformset.FORM2.grid1.column1.controlsource=thetable.thefield
>                .
>                .
>                .                          

>then I did a  thisform.hide and thisformset.form2.show.

>the first time I click on the command1, no error is return BUT when I
>return back to the form1 and click the button again, an error message pops
>up saying

>        property column1 not found

>the error will no go away until I completely quit VFP and start again.

>I wonder if this is a BUG in VFP5.0 or is there something wrong with my
>method of working ?

Is Column1 defined in your grid?  How many columns have you allocated
for Grid1?  Has RecordSource been set to thetable?

In general, if you plan to adjust the contents of a grid during
program execution, you either need to have the grid defined with
placeholders or create the grid in the Click method on Command1.

--
Christopher Reed


"Resistance is REALLY futile."



Sun, 08 Aug 1999 03:00:00 GMT  
 FOUND VFP5.0 GRID BUG - Column not found error

Quote:
>   Hi....

>   This is what I did : -

>           I create a tempory table in FORM1.Command1.click  to my temporary
>   directory in C: drive using the "copy struct to" command.

>           Then I set

>                   thisformset.FORM2.grid1.column1.controlsource=thetable.thefield
>                   .
>                   .
>                   .

>   then I did a  thisform.hide and thisformset.form2.show.

>   the first time I click on the command1, no error is return BUT when I
>   return back to the form1 and click the button again, an error message pops
>   up saying

>           property column1 not found

>   the error will no go away until I completely quit VFP and start again.

>   I wonder if this is a BUG in VFP5.0 or is there something wrong with my
>   method of working ?

>   Please Advice
>   Stanley Tan




Hi, Stanley. Is "sg" in your address for Singapore?

  Well, I simulated your situation and ran some tiny investigation.
The point is, that when you close a table being a RecordSource for the
existing Grid object, latter looses all its Columns and its ColumnCount is
set to 0. So, after you have closed your temporary DBF and is trying to
activate your secondary form your ThisFormSet.Form2.Grid1 Grid object doesn't
have either contained object Column1, or (quite naturally) property Column1,
so an error message here is rather understandable. Being not very proficient
in VFP I can't decide whether it is a bug or the proper way things are going.
What can I advise to cure this situation? You can define Column1 using
Grid1.AddColumn method each time you click Command1, setting
Grid1.ColumnCount to 0 before (just in case). I can't say anything
about performance in this case. This feature is a nuisance, I agree, and
looks very different from FPD/FPW BROWSE.

Best regards.
---

tel. 7-3832-22-08-35



Sun, 08 Aug 1999 03:00:00 GMT  
 FOUND VFP5.0 GRID BUG - Column not found error



Quote:
>            thisformset.FORM2.grid1.column1.controlsource=thetable.thefield
> the first time I click on the command1, no error is return BUT when I
> return back to the form1 and click the button again, an error message
pops
> up saying

>    property column1 not found
> I wonder if this is a BUG in VFP5.0 or is there something wrong with my
> method of working ?

Chances are this is a problem with your code, rather than Fox. What are you
doing with the grid on Form2? Are you closing it after you look at it? Are
you changing the RowSource? There are quite a few things which could be
causing this, and it's hard to tell from your description so far: can you
give more details?
--
Garrett Fitzgerald
Software R&D
MicroKnowledge, Inc.
Bangor, ME


Sun, 08 Aug 1999 03:00:00 GMT  
 FOUND VFP5.0 GRID BUG - Column not found error

Quote:
>This is what I did : -
>    I create a tempory table in FORM1.Command1.click  to my temporary
>directory in C: drive using the "copy struct to" command.
>    Then I set
>            thisformset.FORM2.grid1.column1.controlsource=thetable.thefield
>            .

Hi Stanley,

This is an easy one <s>. When you reset the recordsource of the grid,
I bet it is defaulting back to ColumnCount = -1 (use all rows in the
table). All you'd have to do is put a line that said something like:

Mygrid.ColumnCount = FCOUNT("mytable")

... right after you re-assign the source table for the grid.

Best,

Quote:
>L<



Mon, 09 Aug 1999 03:00:00 GMT  
 FOUND VFP5.0 GRID BUG - Column not found error

Thank you very much for your reply.

I manage to find the exact thing thatn you did.  The solution that I found
is that :-

        Blank RecordSource of Grid1 during design time.

        Everytime I exit the form, I set RecordSource of the Grid to "" and the
        ControlSource of the Column(n) to ""

        and

        Set them Back AFTER I create the temp table and entering the form again!

Thanks a million anyway,

P.S : - Yap..."sg",  that's definitely Singapore.



Quote:
> Hi, Stanley. Is "sg" in your address for Singapore?

>   Well, I simulated your situation and ran some tiny investigation.
> The point is, that when you close a table being a RecordSource for the
> existing Grid object, latter looses all its Columns and its ColumnCount
is
> set to 0. So, after you have closed your temporary DBF and is trying to
> activate your secondary form your ThisFormSet.Form2.Grid1 Grid object
doesn't
> have either contained object Column1, or (quite naturally) property
Column1,
> so an error message here is rather understandable. Being not very
proficient
> in VFP I can't decide whether it is a bug or the proper way things are
going.
> What can I advise to cure this situation? You can define Column1 using
> Grid1.AddColumn method each time you click Command1, setting
> Grid1.ColumnCount to 0 before (just in case). I can't say anything
> about performance in this case. This feature is a nuisance, I agree, and
> looks very different from FPD/FPW BROWSE.

> Best regards.
> ---

> tel. 7-3832-22-08-35



Tue, 10 Aug 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. SQL Error Column not found?

2. Do while found--- what if not found?

3. Column '' is not found

4. SQL Column is not found

5. Column not found HELP!!!

6. Error 12 - Variable is not found error

7. Column not found...

8. SQL: Column 'ITEMCODE' is not found

9. Error 1426 - OLE error: Appropriate license for this class not found

10. SQL Column is not found

11. Column not found

12. alias not found : is this a bug?

 

 
Powered by phpBB® Forum Software