| Subject |
Re: Preview.wfm and report printing |
| From |
Ken Mayer <dbase@nospam.goldenstag.net> |
| Date |
Wed, 1 Nov 2023 12:23:23 -0700 |
| Newsgroups |
dbase.getting-started |
On 11/1/2023 11:18 AM, trevor wrote:
>
> function PUSHBUTTON1_onClick
>
> q = new QUERY()
>
> fdat1 = {10.09.2023}
> q.sql = 'select * from "transfers.DBF" where transfer > fdat1'
>
> active = true
Try making this:
q.active = true
active is a property of the query object. You may want to start using
the assignment operator:
q.active := true
If you had done that above, with:
active := true
You should have gotten an error that "active doesn't exist" (or words to
that effect). The code you are showing just creates a variable named
"active" and assigning it a value of "true".
Please start using the assignment operator. It will save you a lot of
frustration in the long run. (Note, don't use it if creating a new
object or varibale, so in the first statement below to create 'u', you
wouldn't want to use the assignment operator, but u.source := q.rowset,
and so on ...)
> u = new UpdateSet()
> u.source =q.rowset
> u.destination = "temptransfers.dbf"
> if _app.databases[1].tableExists("temptransfers.dbf" )
> u.append()
> else
> u.copy()
> endif
>
> * save to temptransfers.dbf
> return
>
The commented out "save to ..." only works with XDML -- you are trying
to combine XDML and OODML here. The XDML command looks at the current
XDML workarea and doesn't see anything to save ... as far as that
command is concerned there is no table open, because it doesn't
communicate with the OODML objects.
Ken
--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
dBASE DOS to Windows Tutorial:
http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm
|
|