Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Having a problem with a DATETIME index in a VIEW and a TABLE
My application is built in VFP5 and running against a rather small Fox database. I have a view that is not automatically updating the table when the view is modified, and I cannot figure out why.
In the View Designer on the Update Criteria tab, I have "Send SQL Update" checked, SQL WHERE clause includes "Key and modified," and UPDATE using "SQL UPDATE."
I have 4 key fields in my view: 1 is an INTEGER, 2 are CHARACTER, and the last is a DATETIME field.
In the table which most of the view is based on, I have several indexes, one which is on the DATETIME field. I've found something very interesting regarding this indexed field:
1. In my Fox editor command window, I type the USE command to open the table
2. I then go to the properties for that table and set the index order to the DATETIME index.
3. In the command window, I type "set hours to 24"
4. In the command window, I type "seek({01/13/99 10:27:33})", which is one of the datetime entries in my table.
5. SEEK() returns .F.
6. I browse my table and edit the datetime entry, changing it to "01/13/99 10:27:28"
7. In the command window, I type "seek({01/13/99 10:27:28})"
8. This time, SEEK() returns .T.
9. When I browse my table, I now have 2 records representative of the 1 record I changed, kind of like the tag set on the original record is still there for some reason.
10. Using my DOWN ARROW while browsing the table, I am unable to arrow past the newly inserted record until I REINDEX, which puts me back at step #4.
Has anyone else ever run into this problem? It's aggrevating! Any advice would be greatly appreciated...
The reason for me posting this question is that modifications in my VIEW aren't reflected AT ALL in my TABLE, and I can't figure out why. I was wondering if it had anything to do with the DATETIME index.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement