Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ASP / Database Access / March 2006



Tip: Looking for answers? Try searching our database.

reading foxpro .dbf from asp causing lock

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mbosco51@hotmail.com - 27 Mar 2006 20:17 GMT
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.
Bob Barrows [MVP] - 27 Mar 2006 21:44 GMT
> 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
[quoted text clipped - 6 lines]
>
> 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
Signature

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.

mbosco51@hotmail.com - 28 Mar 2006 22:24 GMT
Thanks Bob.  I gave the account full permissions to the folder and it
still is a problem.  I'm thinking of just taking a copy of the file
whenever it changes and I'll just display the values from the copy.
This way the real file wont be locked.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.