Primary vs Secondary files

fernando.olmos at hpa.com.au fernando.olmos at hpa.com.au
Sun Sep 11 20:03:54 CDT 2005


Yes. It works now. All I did was place the NEED 1 as you suggested
Michael.
 
Thank you
-----Original Message-----
From: Fernando Olmos 
Sent: Monday, September 12, 2005 10:43 AM
To: powerh-l at lists.sowder.com
Cc: 'Michael.Lee at mclsystemsinc.com'
Subject: RE: Primary vs Secondary files


Oops. I did omit the SECONDARY verb by mistake. I did actually have it
in the original code and it would not work.
I am trying your suggestion now. stand by.
 
Thank you
-----Original Message-----
From: Michael.Lee at mclsystemsinc.com
[mailto:Michael.Lee at mclsystemsinc.com] 
Sent: Monday, September 12, 2005 10:23 AM
To: Fernando Olmos
Subject: Re: Primary vs Secondary files


Hi Fernando,

I see a couple of issues:
The first is that you haven't declared the 2nd file as 'secondary'.
Since the program wouldn't compile this way I assume it was a problem
with your copying the code to your email.
The second thing is that a secondary will only get update if it's record
status is changed to alteredrecord. That means that a field from the
'www_users' table must be modified on the screen by the user or modified
by a LET statement in a procedure (one that is not the FIND or PATH
procedure). 

My guess is that the SECONDARY file is not being modified. You can get
around this by putting a NEED 1 option on the FILE statement for the
SECONDARY file or doing a LET instead of a FINAL statement in something
like the PREUPDATE procedure.


Regards,


Michael Lee
MCL Systems Inc.


fernando.olmos at hpa.com.au <mailto:fernando.olmos at hpa.com.au>  wrote:


This sounds crazy, but I thought secondary files were meant to
automatically add/update/delete along with the primary file in quick.

I have a simple code... 

screen tmp 
file copy_file in isdb primary 
select if copy_type = 'xx' 
file www_users in natdb 
item user_id final user_id of copy_file 
item domain final "VIC" 
gen 
go 

The primary key of the www_users table is the user_id and domain field
combo. The primary key of the copy_file is user_id and a column called
copy_type which in this case must be 'xx'

Well the screen builds and runs perfectly, but when I add a new record
to copy_file, there is nothing been added to www_users.

I haven't worked with qdesign for a long time and my faint memory cells,
tell me this was once a possibility. I guess I am missing something
here.

Thanks 

Fernando Olmos 
M.I.S. 

HPA
Direct:  03 9217 5411
Mobile: 0410 382 857
Fax:     03 9217 5716 

 <file:///H:/Appdata/Microsoft/Signatures/www.hpa.com.au> www.hpa.com.au



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20050912/e5026a4d/attachment.html


More information about the powerh-l mailing list