View Full Version : ASP Access transaction log
10-08-2007, 07:08 PM
I have an access database for a hotel room list which includes how many rooms I have available for each hotel. This list is updated via a form that updates the database, either adding or removing rooms. The database is on the server and is accessible by four employees, each of whom can update the hotel room number as they sell them.
The hotel rooms are in a table and this table is updated and records who updated it last by overwriting the previous update entry. I want to create a log file that records ALL updates each time the form is submitted, so I can track all transactions. I have not found any info on how this is done. Do I need to create a secondary table that only records when the form is submitted and database is updated? How do I do this?
Thanks on advance!!
10-08-2007, 07:14 PM
You can use FileSystemObject to create files/edit.
Set Fso = Server.CreateObject("Scripting.FileSystemObject")
Set LogFile = Fso.CreateTextFile(Server.MapPath("."),8,true) 'Creates a text file on the same folder.
LogFile.WriteLine("[" & Now() & "] Transaction number: " & ID & ", More information")
Set Fso = Nothing
Set LogFile = Nothing
10-08-2007, 07:16 PM
Access does not have any transaction logging as you require.
You are going to need to do what you have already suggested, building a second table use for auditing.
Then, inside your code, you will need to set up a function that writes the required information to the Access "Auditor" table as necessary.
Hate to tell you that, but it's one of the [many] limitations that Access has, being a glorified Excel, rather than an ANSI SQL database system.
Have you considered looking at MySQL?
10-08-2007, 07:28 PM
I'm getting this error
Microsoft VBScript runtime error '800a0046'
/inventory/update_entry.asp, line 5
10-08-2007, 07:31 PM
When trying to run my code? Then it's obvious you have an access problem. You should go to the file's security options and check the permissions you need.
10-08-2007, 08:19 PM
This permission problem is because you need to give the IUSR_ modify access to that file.
That will solve this problem.
10-08-2007, 08:23 PM
Where do I set this property, I have not found it within Access. Thanks for the help so far!!
10-08-2007, 08:30 PM
View the folder you'd like to access.
Right click on it -> Properties.
On the tab Security you have the Groups or username's.
There you select the user you're using and below you have the permissions that user has.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.