I have a question about the behavior of global fields and FM8 variables
in a shared database.
By the way, I am using FMS7 for hosting some databases, and the clients
are FM7 and FM8 (will change all to FM8).
First, I noticed the following behavior for global fields:
- if I have a local (not shared) database, then if I change a global
field and close FM, the value is saved
- if I take the database and host it on the server, each client will
see the last saved value before hosting, and all changes to global
fields are visible only in the current session, which means:
-- if one client modifies a global field, other clients will not see
the changed value; it's as if each session has a separate copy of that
field
-- the modified values are not saved to the server - it keeps the last
value that was saved before hosting
Can you please confirm this behavior (I'm not sure I got it right) and
perhaps explain it if you know the reasoning?
The second question is: do global variables ($$xxx) in FM8 have the
same behavior as described above?
Thanks
Adrian
|
|
0
|
|
|
|
Reply
|
aditsu (30)
|
10/24/2005 8:10:47 AM |
|
In article <1130141447.962212.107140@g44g2000cwa.googlegroups.com>,
aditsu@gmail.com wrote:
>I have a question about the behavior of global fields and FM8 variables
>in a shared database.
>By the way, I am using FMS7 for hosting some databases, and the clients
>are FM7 and FM8 (will change all to FM8).
>
>First, I noticed the following behavior for global fields:
>- if I have a local (not shared) database, then if I change a global
>field and close FM, the value is saved
>- if I take the database and host it on the server, each client will
>see the last saved value before hosting, and all changes to global
>fields are visible only in the current session, which means:
>-- if one client modifies a global field, other clients will not see
>the changed value; it's as if each session has a separate copy of that
>field
>-- the modified values are not saved to the server - it keeps the last
>value that was saved before hosting
>
>Can you please confirm this behavior (I'm not sure I got it right) and
>perhaps explain it if you know the reasoning?
In general, this is how global fields behave in a served environment. I'm
using FM6, but I don't think it's much different in 7. You have to think
of globals as temporary variable fields, definitely not a place to store
either permanent information, or data intended to be used by multiple
users. A scandalized old Unix guy at work loves to shout "Globals are
local!" He finds this endlessly funny. It just indicates that the
feature is not well-named.
A general way to deal with this I use is to set up a one-record served
database, call it storage.fp7 or something. Make a number field called
"Constant" and put a one in it. Make number calc fields in all other dbs
that need to access this, and the calc is a one. The field should always
contain a one across all records. Set up your relationships using these
Constant fields as keys.
In Storage, make a bunch of text fields, number fields, container fields,
etc. that you need to store info to be commonly used by all users. *Not*
global fields, regular fields. This information can be seen and used
across the constant relationship. Experiment. In some cases you might
need to make some globals in Storage and set up some scripts to
temporarily fill them when data is being passed across.
But the key point is that your info ius now safely stored in "real" fields
instead of globals, yet it is accessible by multiple users simultaneously,
as if it were storerd in globals.
Steve Brown
|
|
0
|
|
|
|
Reply
|
eyebrown
|
10/24/2005 12:34:52 PM
|
|
You have it right for global fields. Global variables are only kept
alive per person per session. They are never stored with the database
regardless of whether it is opened local or shared.
aditsu@gmail.com wrote:
> I have a question about the behavior of global fields and FM8 variables
> in a shared database.
> By the way, I am using FMS7 for hosting some databases, and the clients
> are FM7 and FM8 (will change all to FM8).
>
> First, I noticed the following behavior for global fields:
> - if I have a local (not shared) database, then if I change a global
> field and close FM, the value is saved
> - if I take the database and host it on the server, each client will
> see the last saved value before hosting, and all changes to global
> fields are visible only in the current session, which means:
> -- if one client modifies a global field, other clients will not see
> the changed value; it's as if each session has a separate copy of that
> field
> -- the modified values are not saved to the server - it keeps the last
> value that was saved before hosting
>
> Can you please confirm this behavior (I'm not sure I got it right) and
> perhaps explain it if you know the reasoning?
>
> The second question is: do global variables ($$xxx) in FM8 have the
> same behavior as described above?
>
> Thanks
> Adrian
>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Howard Schlossberg (818) 883-2846
FM Pro Solutions Los Angeles, California
FileMaker 7 Certified Developer
Associate Member, FileMaker Solutions Alliance
|
|
0
|
|
|
|
Reply
|
Howard
|
10/24/2005 6:44:46 PM
|
|
Thank you both for your replies.
I think I can live with this functionality, I don't really need global
fields that affect all users/sessions and are stored. Sometimes I want
to change the initial value of some global fields, and I think I know
two ways to do that:
1. close the database, open it locally and change the desired values
(cleaner but more complicated)
2. use the startup script in file options
I also wanted to confirm that global variables are local to each
session. This is good for what I need to do. Of course, I didn't expect
them to be stored in the database.
Thanks
Adrian
|
|
0
|
|
|
|
Reply
|
aditsu
|
10/25/2005 5:34:06 AM
|
|
In article <1130218446.700672.316050@g43g2000cwa.googlegroups.com>,
aditsu@gmail.com says...
> Thank you both for your replies.
> I think I can live with this functionality, I don't really need global
> fields that affect all users/sessions and are stored.
You most certainly do!! That's what the regular fields are! It wouldn't
be much of a database without them.
> Sometimes I want
> to change the initial value of some global fields, and I think I know
> two ways to do that:
> 1. close the database, open it locally and change the desired values
> (cleaner but more complicated)
> 2. use the startup script in file options
#1 has issues in that you must restart the database on the server to
make any changes. Its also vulnerable to inadvertantly getting reset
during an import/upgrade.
#2 has issues in that you must restart the database on each client to
make any changes.
#3 Using a single record "preferences" table is generally the best
solution.
> I also wanted to confirm that global variables are local to each
> session. This is good for what I need to do. Of course, I didn't expect
> them to be stored in the database.
Consider it confirmed.
-regards,
Dave
|
|
0
|
|
|
|
Reply
|
42
|
10/25/2005 7:59:20 AM
|
|
42 wrote:
> > I don't really need global
> > fields that affect all users/sessions and are stored.
>
> You most certainly do!! That's what the regular fields are! It wouldn't
> be much of a database without them.
Well, I was talking about global fields (one field per table, not per
record), to be used as variables or temporary input fields.
> > Sometimes I want to change the initial value [...]
>
> #1 has issues in that you must restart the database on the server to
> make any changes. Its also vulnerable to inadvertantly getting reset
> during an import/upgrade.
Agreed
> #2 has issues in that you must restart the database on each client to
> make any changes.
That's not a problem in my case.
> #3 Using a single record "preferences" table is generally the best
> solution.
But then it would not be local to each session.
Thanks
Adrian
|
|
0
|
|
|
|
Reply
|
aditsu
|
10/25/2005 8:22:10 AM
|
|
In article <1130228530.705018.30990@g47g2000cwa.googlegroups.com>,
aditsu@gmail.com says...
>
> 42 wrote:
> > > I don't really need global
> > > fields that affect all users/sessions and are stored.
> >
> > You most certainly do!! That's what the regular fields are! It wouldn't
> > be much of a database without them.
>
> Well, I was talking about global fields (one field per table, not per
> record), to be used as variables or temporary input fields.
Naturally. I was just poking fun.
> > > Sometimes I want to change the initial value [...]
> >
> > #1 has issues in that you must restart the database on the server to
> > make any changes. Its also vulnerable to inadvertantly getting reset
> > during an import/upgrade.
>
> Agreed
>
> > #2 has issues in that you must restart the database on each client to
> > make any changes.
>
> That's not a problem in my case.
>
> > #3 Using a single record "preferences" table is generally the best
> > solution.
>
> But then it would not be local to each session.
Of course. I wasn't under the impression that was actually a requirement
for what you were trying to do.
It sounded more like you wanted to have some "system constants"... e.g.
a "tax rate", implemented as a global, and wanted to know how and when
changing it would be reflected, on the odd ocassion that you wanted to
change the value.
For system constants a single record table works best while globals are
more suited for session variables
With respect to system constants, globals can be used, as you've noted,
provided you deal with initializing them, and are willing to put up with
restarts to change them, where single record tables have neither
drawback.
As an aside, if you do need 'per user' variables that do get persisted
-- a common enough requirement (for storing user "preferences"), a table
with a record for each user is the way to go.
-regards,
Dave
|
|
0
|
|
|
|
Reply
|
42
|
10/25/2005 6:32:09 PM
|
|
|
6 Replies
318 Views
(page loaded in 0.112 seconds)
Similiar Articles: Pointers to global and stack variables - comp.compilersSharing, variables and global fields - comp.databases.filemaker ... I have a question about the behavior of global fields and FM8 variables in a shared database. ... share ... Global Variable vs Struct Variable Question - comp.lang.asm.x86 ...Pointers to global and stack variables - comp.compilers I have a question about the behavior of global fields and FM8 variables in a shared database. ... share ... struct ... struct/union difference - comp.lang.c++.moderated... at issue was that if two variables at class scope were to share ... struct and just declaring the variables (on the stack or in global ... free encyclopedia A bit field is ... Copy-on-write for real/imaginary parts of complex data? - comp ...The CrossLink field of the mxArray header just points to the other sharing mxArray header, not to the pr ... So, yes, I see the problem that global variables could cause ... Hung processes - comp.databases.mysqldo this on the cmd line: show global variables like 'wait ... to the same database, but you don't want them sharing ... for my ignorance, I don't come from the DBA field ... CS, DS, and SS Segments Together? - comp.lang.asm.x86One of the fields in the SYSTEM_INFO structure is ... DATA segment under MASM 6.14 so I can write global variables by ... Even if your program does not load any share ... [comp.publish.cdrom] CD-Recordable FAQ, Part 1/4 - comp.publish ...Archive-name: cdrom/cd-recordable/part1 Posting-Frequency: monthly Last-modified: 2008/10/09 Version: 2.71 Send corrections and updates to And... Integers on 64-bit machines - comp.compilers... checks are required only for assignments to such variables ... steps: 1) machine specific "Integer" 2) with a global ... Technology questions at ibibo, Give answers share your ... How best to detect duplicate values in a column? - comp.databases ...It even alerts me to undeclared variables that I call ... Example (truncated to just the relevant >fields ... obvious sort orders to implement are: - Largest global ... Solutions manual to Operations Management 10e William J. Stevenson ...... Instructors Solution Manual(Pearson 2005) -Field and ... Giancoli Solution Manual -Probability, Random Variables ... Global Business Today Hill 2Canadian -Global Business ... Global variable - Wikipedia, the free encyclopedia... copy is shared among all instances; hence static fields are used for many of the same purposes as global variables in other languages because of their similar "sharing ... filemaker • View topic • Use global fields instead of variablesSharing, variables and global fields I have a question about the behavior of global fields and FM8 variables in a shared database. By the way, I am using FMS7 for ... 7/20/2012 12:21:16 PM
|