Get external data locks text file - permission denied

  • Thread starter Thread starter eastmadc
  • Start date Start date
E

eastmadc

I have a scenerio where I am querying a csv file off from a network
drive using excel. This file is appended with information written by
another computer.
When I import a text file using a database query with the microsoft
text driver I intermittently experience a permission denied on the
computer writing to this csv file.
There is no need for excel to lock the csv file qhen querying (as I am
not writing to the file).

I modified the DSN file to add readonly=1 which did not work. How
can I resolve this issue?

Thanks for your help.

Dustin
 
Dustin
The standard text driver always rather greedily takes a full lock. The
esiest workaround is to copy the file and query that temp copy.
There may be other drivers with better locking, I just used the above
workaround through

Cheers
Simon
Blog: www.smurfonspreadsheets.net
Website: www.codematic.net Excel development, support and training
 
I do have the ability to give read only permissions to the excel
user. This should prevent the text driver from locking the file
correct? Or is there a better way?
 
Back
Top