.NETGURU
Access Locking
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-oledb' list.


Timothy S. Giorgi
Hello List,

I am having trouble referencing an access database. The program runs
fine on my development server but when posted to the ISPs server I get
an error message of "Can't Lock File". I am only asking for Read access
so am puzzled by this.

I built the connection string in Visual Studio's connection designer .
here is what it came up with:

sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";" _
& "User ID=Admin;" & "Data Source=db.mdb;" & ";" _
& "Mode=Read;Extended Properties="""";Jet OLEDB:System database="""";" _
& "Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet
OLEDB:Engine Type=5;" _
& "Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Global Partial Bulk
Ops=2;Jet OLEDB:Global Bulk Transactions=1;" _
& "Jet OLEDB:New Database Password="""";Jet OLEDB:Create System
Database=False;Jet OLEDB:Encrypt Database=False;" _
& "Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact
Without Replica Repair=False;Jet OLEDB:SFP=False"

I have tried setting the "locking mode" to zero - no luck as well as
play with the "Mode" options - neither seemed to do any good.

I saw a similar message to this posted in January but no responses ...
has anyone else encountered this?

Thanks in advance,

Timothy S. Giorgi
Optimum Solutions

Reply to this message...
 
    
Gregory Brown
I'm not positive, but I think I had this error awhile back. I think I
solved it by writing my "own" connection string. The one generated by
vs.net is out of control, and in my opinion, headed straight to hell.
A little trick I learned back in Nam to get the connection strings written
for you:
Open up Notepad and save a blank file on the desktop with a .udl extension,
like
whatever.udl
Close the file and double click it on the desktop to open it. It will open
up the Data Link Properties form that every nerd is accustomed to. Select
your Provider and database and then close it. Open up a new blank Notepad
document and drag and drop the whatever.udl onto the new document and it
will spit out the connection string for you. Sounds like a lot of steps,
but once you've done it a few times, it works pretty quickly.

Greg

"Timothy S. Giorgi" <Click here to reveal e-mail address> wrote in message
news:658601@ngfx-oledb...
[Original message clipped]

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification