MarkD Posted May 7, 2003 Posted May 7, 2003 H-E-L-P! Having trouble getting onto 1st base. ADO.NET Any ideas why I might be getting a Security Error code 5 trying the following code to open my database in VB.Net? PCcon = New ADODB.Connection() PCcon.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=H:\Access\VDS-prototype.mdb") The database exists where I'm looking. I also tried adding security parms with no difference: User ID=Admin;password=; or User ID=myid,Password=mypw; (but I shouldn't need them anyway because I'm already logged on to my PC and that's where the H drive resides) Thanks in Advance! Quote
archer_coal Posted May 8, 2003 Posted May 8, 2003 RE: The H:\ drive is a local drive? or Network drive? Is it a USB drive? OR a Hard Disk? Quote
*Experts* Nerseus Posted May 8, 2003 *Experts* Posted May 8, 2003 Make sure you don't have the database open in Access when you run your program. I think the default method of opening a connection in Access is non-shared (exclusive). If you have it open in Access, it won't let you open it through .NET. Otherwise it looks like a good connection string. If you want, you can use JUST "User ID=Admin;" - no need to specify the password, though you could use ";Password=;" if you want. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.