reading foxpro .dbf from asp causing lock
am 27.03.2006 21:17:02 von mbosco51
Hi. I am reading a foxpro .dbf file and displaying the results on an
asp page. The page is working fine, but I did notice something
strange. After the page is done loading the dbf file appears to be
locked for the next minute. When I try to open it in FoxPro I get a
"File access is denied" message. After about a minute from the end of
the page load, the lock goes away and I then can open the dbf in FoxPro
again. If I hit refresh on the page, I'm rewarded with another 60
second lock...
My code to open the table is like so...
set conDB = Server.CreateObject("ADODB.Connection")
conDB.Open "Driver=Microsoft Visual Foxpro
Driver;UID=;SourceType=DBF;SourceDB=c:\;Exclusive=No;"
set rsDB = Server.CreateObject("ADODB.RecordSet")
strSQL = "select * from tablename"
rsDB.Open strSQL, conDB
....
rsDB.Close
set rsDB = Nothing
set conDB = Nothing
I was hoping the Exclusive=No on the connection string would fix this
problem, however it doesn't seem to have any affect. Any ideas?
Thanks.
Re: reading foxpro .dbf from asp causing lock
am 27.03.2006 22:44:11 von reb01501
mbosco51@hotmail.com wrote:
> Hi. I am reading a foxpro .dbf file and displaying the results on an
> asp page. The page is working fine, but I did notice something
> strange. After the page is done loading the dbf file appears to be
> locked for the next minute. When I try to open it in FoxPro I get a
> "File access is denied" message. After about a minute from the end of
> the page load, the lock goes away and I then can open the dbf in
> FoxPro again. If I hit refresh on the page, I'm rewarded with
> another 60 second lock...
>
> My code to open the table is like so...
There may be filesystem permissions that need to be correct for foxpro as
there are for Jet. With Jet, all users of the database require Change/Modify
permission for the _folder_ containing the database in order to allow them
to create/edit/delete the locking file. I don't know foxpro, but perhaps the
same requirement is true for foxpro. If your site has Anonymous
authentication turned on, then the IUSR_machinename account requires Change
permissions for that folder.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.