I have on a card a field "DateOfBirth" and one "Age".
These are linked (properties) to a query and column in the database.
Following calculation of Age, my 'view' of the Age field is fine.
The database is updated.
However if I move to another record and back I see the original data in the fields.
The fields are not updated until I leave the card and return to it.
Whilst I understand this, is there a way of refreshing the card view, and hence field properties?
Database - Field properties - Refresh fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Database - Field properties - Refresh fields
Glenn,
Not enough info, don't understand, am confused by your question.
You go to a different card and back to see the updated field, yet the field is not updated?!
How do you link (properties) to queries and columns?
What triggers the update of the database?
When exactly do you expect your field to be updated? Since you are typing the info into the field and the database is actually updated, the old data doesn't exist anymore. Where does the old data come from?
Mark
Not enough info, don't understand, am confused by your question.
You go to a different card and back to see the updated field, yet the field is not updated?!
How do you link (properties) to queries and columns?
What triggers the update of the database?
When exactly do you expect your field to be updated? Since you are typing the info into the field and the database is actually updated, the old data doesn't exist anymore. Where does the old data come from?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Database - Field properties - Refresh fields
I think you are using the "Database query builder", right ?
If you do, then... you don't.
It has been discontinued.
If you do, then... you don't.

Re: Database - Field properties - Refresh fields
Mark:
You go to a different card and back to see the updated field, yet the field is not updated?!
Correct.
How do you link (properties) to queries and columns?
Create a database query and set the Database properties of the field. See link below.
What triggers the update of the database?
UPDATE query, and using my SQLite manager I can see the database is updated immediately the query is run.
When exactly do you expect your field to be updated? Since you are typing the info into the field and the database is actually updated, the old data doesn't exist anymore. Where does the old data come from?
The database is updated but the card has not 're-queried' the database. The database properties apparently only get refreshed preOpen or onOpen, and this should happen on the database update.
Bangkok:
I think you are using the "Database query builder", right ?
The Database Query Builder was used to build the SELECT query for the field database properties.
If you do, then... you don't.
It has been discontinued.
The Database Query Builder is alive and well in my LC 4.6.1. The Database Query Builder is a component of LC, documented and a valid and handy tool for simple SELECT queries.
"Creates or edits settings for using an SQL database. Using the
Database Query Builder, you can connect to a database and
specify a SQL query to generate a cursor result set. Connection
settings and cursor result sets can be linked to fields for display
of the data, using the Database pane in the field's property
Inspector. For more details, see the section on Working with
Databases."
http://lessons.runrev.com/spaces/lesson ... ry-Builder
glenn52
You go to a different card and back to see the updated field, yet the field is not updated?!
Correct.
How do you link (properties) to queries and columns?
Create a database query and set the Database properties of the field. See link below.
What triggers the update of the database?
UPDATE query, and using my SQLite manager I can see the database is updated immediately the query is run.
When exactly do you expect your field to be updated? Since you are typing the info into the field and the database is actually updated, the old data doesn't exist anymore. Where does the old data come from?
The database is updated but the card has not 're-queried' the database. The database properties apparently only get refreshed preOpen or onOpen, and this should happen on the database update.
Bangkok:
I think you are using the "Database query builder", right ?
The Database Query Builder was used to build the SELECT query for the field database properties.
If you do, then... you don't.

The Database Query Builder is alive and well in my LC 4.6.1. The Database Query Builder is a component of LC, documented and a valid and handy tool for simple SELECT queries.
"Creates or edits settings for using an SQL database. Using the
Database Query Builder, you can connect to a database and
specify a SQL query to generate a cursor result set. Connection
settings and cursor result sets can be linked to fields for display
of the data, using the Database pane in the field's property
Inspector. For more details, see the section on Working with
Databases."
http://lessons.runrev.com/spaces/lesson ... ry-Builder
glenn52
Re: Database - Field properties - Refresh fields
Glenn,
I always had trouble with the database query builder and I have always been scripting databases by hand. Apparently, I wasn't the only one, since it has indeed been discontinued. The stack is included in the current LC package for compatibility reasons only. It is not recommended to use it. Mentions of the query builder in the documentation are relics of the past.
Kind regards,
Mark
I always had trouble with the database query builder and I have always been scripting databases by hand. Apparently, I wasn't the only one, since it has indeed been discontinued. The stack is included in the current LC package for compatibility reasons only. It is not recommended to use it. Mentions of the query builder in the documentation are relics of the past.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode