Subject Re: How to save a Table field value in memory variable
From Mervyn Bick <invalid@invalid.invalid>
Date Mon, 17 Nov 2014 10:54:00 +0200
Newsgroups dbase.getting-started

On Fri, 14 Nov 2014 14:02:38 +0200, Janardhana Kini <jktonse@yahoo.co.in>  
wrote:

> I am trying tables, forms design etc on dBASE 9 in win 7 also in Dbase8  
> under Win XP.  Pl HELP.  I am a regular developer in Clipper summer  
> '87...
> Also I have querries like Searching a keyfield in tables thru popups and  
> validating a keyfield eg: Product Code at entry point.
>
> Kindly help
>

I'm not quite sure if you want to save data from a memory variable to a  
table or if you want to save data already in a table to a memory  
variable.  Either way you need a query object to access the table.

    mVar = form.query.rowset.fields["whatever"].value

or

   form.query.rowset.fields["whatever"].value = mVar

It's a lot more typing than the old XDML way of mVar = alias->whatever or  
replace alias->whatever with mVar but you'll soon get used to it (and  
there are ways of using some shortcuts) and it's a small price to pay for  
access to the power of object oriented programming.

Programming in the latest versions of dBASE is event driven and is quite  
different to the hierarchical programming style used in Clipper '87 so  
there is quite a bit of learning to do.  You will have received a copy of  
the second edition of Ken Mayer's dBase Book (the third edition is  
available from his website  http://www.goldenstag.net/dbase/ ) with your  
copies of dBASE Plus 8 and 9.  Under Windows XP you will find it at  
C:\Program Files\dBASE\Plus8\Docs\TheCompleteBook.pdf   This book was  
written before dBASE 8 was made available (as was the third edition) so it  
doesn't cover the newer features in dBASE.  It does, however, cover more  
than enough to get you started.

With any tool, even something as simple as a hammer, one needs to know how  
to use the actual tool before using it to create something.  You would,  
therefore, be well advised to read Ken's book and spend some time with the  
dBASE User's Guide before you dive straight into using dBASE.

Remember the old adage.  When all else fails, read the instructions.


Mervyn.