Updating Timestamp field (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


RickSton75 -> Updating Timestamp field (5/29/2002 17:13:34)

Greetings

I'm reasonably new to FrontPage, the DBRW, and ASP. I was pushed into it when my employer needed some dynamic pages. Enough about that I suppose. ;)

I have a very small but highly visible ASP application I've created. I have created an Access database in our company intranet. I have a page that displays records from the database and some administration pages that allow adding/updating/deleting records. Upon creating the form that adds records to the database, I noticed it captured what I'm assuming to be a hidden form field called Timestamp. My records on the display page are sorted in reverse order by this Timestamp field.

My goal is to update this Timestamp field when an update is made. That way the newest information will "float" to the top of the list. Unfortunately, I keep getting a syntax error upon any method I use to update the Timestamp field. I'm assuming it's because the field in the FrontPage form is text and the Access database is expecting some bizarre date format.

I posted in another forum and got as far as being able to set my form field with the current date and time as it displays from the database, but I'm stuck when it comes to actually updating the field with a different date and time.

Any takers?

Sincerely... Rick :)





RickSton75 -> RE: Updating Timestamp field (5/30/2002 0:26:57)

Hi again

I finally got the darn thing to work by creating a totally separate DateTime field.

As an FYI for anyone else that may encounter this little nightmare, here is what was happening to me. (to the best of my knowledge) I initially used a FrontPage form to submit to the database. When mapping form fields in the Form Properties > Options > Saved Fields area, I noticed the "Additional Fields" tab. Inside the tab, I noticed a "Timestamp" field. The database listed a corresponding Timestamp column and it's type was that of Date/Time. Sooooo, I assumed I could effect an update to this field. Wrong-o!

According to a MSDN article I stumbled across, the Timestamp field is designed to auto update when a change has been made to the record. It is also a binary field, which would tend to explain why I was receiving the syntax error when trying to update it. The field wasn't being automatically updated, of course. If it had been, I would have been steered clear of this merry little path.

Sincerely... Rick :)

quote:

Greetings

I'm reasonably new to FrontPage, the DBRW, and ASP. I was pushed into it when my employer needed some dynamic pages. Enough about that I suppose. ;)

I have a very small but highly visible ASP application I've created. I have created an Access database in our company intranet. I have a page that displays records from the database and some administration pages that allow adding/updating/deleting records. Upon creating the form that adds records to the database, I noticed it captured what I'm assuming to be a hidden form field called Timestamp. My records on the display page are sorted in reverse order by this Timestamp field.

My goal is to update this Timestamp field when an update is made. That way the newest information will "float" to the top of the list. Unfortunately, I keep getting a syntax error upon any method I use to update the Timestamp field. I'm assuming it's because the field in the FrontPage form is text and the Access database is expecting some bizarre date format.

I posted in another forum and got as far as being able to set my form field with the current date and time as it displays from the database, but I'm stuck when it comes to actually updating the field with a different date and time.

Any takers?

Sincerely... Rick :)









Spooky -> RE: Updating Timestamp field (5/30/2002 18:04:59)

Yep, its a reservered word - I dont know what they were thinking when they made that. An option is to use [] but a better option is to rename it

§þððk¥
Database / DRW Q & A
VP-ASP Shopping cart
Spooky Login




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625