Subject Re: beginappend() Problem Fixed
From Lee Grant <camilee@nospam.comcast.net>
Date Sun, 2 Jul 2023 04:04:16 -0400
Newsgroups dbase.getting-started

Ken,

Maybe I didn't explain it properly.

1.) I drop first the database object onto the form. Then I drop the
query object onto the form.
2.) Then I set the database object first,
3.) and then set the query object next.

The only difference seems to be, because I dropped both objects on the
form first, and then filled them out in order. That's the only time the
form.rowset property is not being streamed out by the designer. Try it.
Drop both objects on the form without filling either one in. Then fill
in the database object and then fill in the query object, and then save.
Then go look at the source code. There won't be any form.rowset property
line set.

When I do that process, this is the code streamed out by the designer:

--------------------------------------
** END HEADER -- do not remove this line
//
// Generated on 07/01/2023
//
parameter bModal
local f
f = new databaseobjectdropformForm()
if (bModal)
    f.mdi = false // ensure not MDI
    f.readModal()
else
    f.open()
endif

class databaseobjectdropformForm of FORM
    with (this)
       height = 16.0
       left = 94.0
       top = 0.0
       width = 40.0
       text = ""
    endwith

    this.DATABASE1 = new DATABASE(this)
    with (this.DATABASE1)
       left = 14.0
       top = 2.0
       width = 7.0
       height = 1.0
       databaseName = "LEARN"
       active = true
    endwith

    this.QUERY1 = new QUERY(this)
    with (this.QUERY1)
       left = 19.0
       top = 7.0
       width = 5.0
       height = 1.0
       database = form.database1
       sql = "select * from cities.dbf"
       active = true
    endwith


endclass


On 7/2/2023 12:02 AM, Ken Mayer wrote:
> On 7/1/2023 1:12 PM, Lee Grant wrote:
>> Ken,
>>
>> The only thing I'm not doing, is setting the database object first. I
>> usually drop both objects from the pallette on the form first, and
>> then fill them both out, the database object first...and THAT, seems
>> to be the only thing different.
>>
>> Here's the problem, I set the properties before saving the form for
>> all three of the forms, and the one that I do different by dropping
>> both objects from the pallette onto the form and then filling them
>> both out, is the only one NOT getting that property assignment.  So, I
>> guess we could list this as a bug, considering that both are getting
>> set before saving the form officially, it still should see and set the
>> property like it does for the other two forms.
>
> If you set the query first, then dBASE can't find the table, so I am not
> sure this is a bug. If you do them in the correct order, this shouldn't
> be a problem ...
>
> Ken
>
>