By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Link Table to expanding Text file in Access

P: n/a

Hi Experts,

I'm working on Win2k platform, where a process is wrinting to a log
(plain text in tabular form) .

My goal is to view this grawing log on access database, I linked a
table to this text file on local machine, the problem was that generating-log-
process terminated and generated the following error in dos prompt :

The process cannot access the file because it is being used by
another process

Can any one suggest a solution to this simultanuous file access
problem in DOS !!

Thanks in advance
--
Posted via http://dbforums.com
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
a read only log rotator? you could use windows scripting host (or any
decent script implimentation avaialble) to take a timed copy of the
log file - think about the apache log files and the log rotation
implemented there as a model.

So if you need a daily update you can use a schedular to run a script
at 12:00:01AM which copies the existing log to a new file & zeros out
the old log (or not, as needs dictate). you could if you have the room
just keep appending the new log data onto the copy and make your link
to that copy.

cheers

John
alkhatib <me*********@dbforums.com> wrote in message news:<34****************@dbforums.com>...
Hi Experts,

I'm working on Win2k platform, where a process is wrinting to a log
(plain text in tabular form) .

My goal is to view this grawing log on access database, I linked a
table to this text file on local machine, the problem was that generating-log-
process terminated and generated the following error in dos prompt :

The process cannot access the file because it is being used by
another process

Can any one suggest a solution to this simultanuous file access
problem in DOS !!

Thanks in advance

Nov 12 '05 #2

P: n/a
It occurs to me that you should be able to establish a read only link
to the active file as well. perhaps this would suit your needs better.
I see mention of read only links to files hosted on remote servers via
http and ftp, but i don't see a mention of read only links to local
files, hrm... searching...

don't see it mentioned.

John

alkhatib <me*********@dbforums.com> wrote in message news:<34****************@dbforums.com>...
Hi Experts,

I'm working on Win2k platform, where a process is wrinting to a log
(plain text in tabular form) .

My goal is to view this grawing log on access database, I linked a
table to this text file on local machine, the problem was that generating-log-
process terminated and generated the following error in dos prompt :

The process cannot access the file because it is being used by
another process

Can any one suggest a solution to this simultanuous file access
problem in DOS !!

Thanks in advance

Nov 12 '05 #3

P: n/a

Thanks John ,,,

It seems simultanuous file access mechanism in windows is not
allowed !!

I couldn't find a way to link table from MS-Access to local text as a
read -only . Can you suggest a mechanism to do so ?!

Taking into consideration that I'm looking forward to refresh linked
table on a high rate (about 5-15 sec period) . i.e. I want to
monitor logs changing in real-time .

Regards,

Fras
--
Posted via http://dbforums.com
Nov 12 '05 #4

P: n/a
Hrm. I know I posted a response to this once already. it musta taken a
wrong turn on the information highway I guess.

If you are going to refresh in real time then what you want is a
process which runs all the time on a timer -

this process would maintain a cursor,a bytecounter, for how much of
the file has already been processed.

the log would then be opened explicitly in read only mode, allowing
the logging application to continue its write operations.

you probably want a buffer to fetch data from the file into and then
process in your analysis procedure.

This is very similar to monitoring traffic on a port using sockets. In
it's exactly the same since a socketstream and a textstream are
identical when they contain ascii data.

Basically you establish a buffer, say 4096 bytes, and you read data
from your file cursor into it, then you process the bufferm probably
by spliting it into strings, there will be a remainder usually that
does not contain an eol (vbCRLF) which needs to be prepended to the
next buffer read.

Should be a funnish project :)

John

alkhatib <me*********@dbforums.com> wrote in message news:<35****************@dbforums.com>...
Thanks John ,,,

It seems simultanuous file access mechanism in windows is not
allowed !!

I couldn't find a way to link table from MS-Access to local text as a
read -only . Can you suggest a mechanism to do so ?!

Taking into consideration that I'm looking forward to refresh linked
table on a high rate (about 5-15 sec period) . i.e. I want to
monitor logs changing in real-time .

Regards,

Fras

Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.