Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 15th, 2004, 07:59 AM
Registered User
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to marcelescu
Default Manage the .ldb file when ADO opens a Access .mdb

Please help, I'm working on a solution but any sugestions would be apreciated.

I have a problem when I try to open a .mdb Access database from VC++ 6.0 with ADO. The provider is Microsoft.Jet.OLEDB.4.0
If I open the database from my hard drive it's all OK but the moment I use the Connection->Open method it creates the .ldb file in the database directory. What I will need to do is to write the database to a CD and try to open it from there. Also the access mode must not be adShareModeExclusive because the database has to be opened by more than one user simultaneosly. Then I have a problem because the .ldb file can not be created on the CD . Is there a way to change the location of this file or a way not to create it at all?

The code for the connection object looks like this:
     _ConnectionPtr DBConnect;

     DBConnect->Open(_bstr_t(_T(m_sConnectionString)),"", "",adConnectUnspecified);

Thank you for your time. Hope it works:)
Old October 18th, 2004, 06:44 PM
Registered User
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

My experience is access needs read write privileges for the folder containing the database so that when you do a query it can create tempary recordsets etc in the Mdb file the LDB file is only for the record locking if multiple users are using it.
If you dont want unautorised access put a password on it and encrypt it.


Similar Threads
Thread Thread Starter Forum Replies Last Post
MS Access .mdb & .ldb database corrupted faisal573 Access 17 December 6th, 2017 04:38 AM
Creating Access (.mdb) file from ASP mfarooqw ASP.NET 2.0 Basics 1 June 5th, 2007 02:39 AM
Open mde or mdb access file from vb6 gorgo Pro VB 6 1 February 20th, 2006 01:39 AM
.LDB File Access 2000 mrideout BOOK: Beginning ASP.NET 1.0 0 January 1st, 2005 02:30 PM
ADO Recordset to Access MDB sasidhar79 SQL Server ASP 1 June 23rd, 2004 02:15 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.