Greg Hains Posted October 14, 2010 Posted October 14, 2010 Hi. I have an issue that is so basic and weird, I KNOW it's something silly I'm doing but stuffed if I can find out what it is. In my database one of the table is called SETTINGS. There are half a dozen text fields in this table, all set to Global. The purpose of this table is to store info such as:the client's name, their SMTP server, etc etc. The logic I have used is to have a script go to this layout, set global variables to each of these fields, then return to the original layout and display those variables. Problem is that I can write the values into the table fields, and the script runs, picks up the variables, all happy. If I exit the database and come back in, that SETTINGS table has no values in it (the record count is OK, not that it matters), but the contents gone. No other table does this. Greg
bruceR Posted October 14, 2010 Posted October 14, 2010 (edited) First of all these are global fields, not global variables. Secondly, this behavior is normal, and this misunderstanding about the behavior of globals is pretty common. The globals are doing exactly what they are supposed to do. Globals are session-specific. What you need is standard stored fields. You may also want the values stored in the standard fields to be stored in similar-named global fields for easier access by scripts, etc Setting those global fields should be done as part of your startup script. Do a search for "single record resource table". Hopefully others will chime in with further pointers about resource or preference tables. Edited October 14, 2010 by Guest
Greg Hains Posted October 14, 2010 Author Posted October 14, 2010 Hi Bruce. Thanks for your response. After a few fruitless efforts (originally), I felt a variable being set through a lobal field would definitely cover any problems, but in fact made it worse. I changed them back to standard fields and then ensured there was only one record and the whole thing works like a charm. Thanks for your help. Greg
Recommended Posts
This topic is 5155 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now