Sharing a database between Access and a VB5 program

Sharing a database between Access and a VB5 program

Post by Jean-Michel O'Donnel » Tue, 17 Jun 1997 04:00:00



This is a multi-part message in MIME format.
--------------7F67C92E43D4D8BB4A600A83
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I've got a bit of a problem - I had to develop an application that uses
an Access database.  The GUI opens the database with no problems and
works perfectly until the user has the database open in Access.  Then
things go to Heck.

The GUI opens the database as shared (default from my research into this
problem) and Access is also set to open it's databases as shared.  Thing
is, Access won't let anything else touch the database it has opened.  Is
there any way to have the database opened in both Access and VB5?  I'd
hate to have to tell my users that they can't use both my app and Access
at the same time...
--
/***************************************\
|* I'm a wizard, not an English major. *|
|*  Pleas ignorre all uv mine speling  *|
|*     an' gramatickal error, ok!      *|
\***************************************/
--------------7F67C92E43D4D8BB4A600A83
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jean-Michel O'Donnell
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Jean-Michel O'Donnell
n:              ;Jean-Michel O'Donnell

note:           I'm a wizard, not an English major.  Buzz off...
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
end:            vcard

--------------7F67C92E43D4D8BB4A600A83--

 
 
 

Sharing a database between Access and a VB5 program

Post by vbmaste » Tue, 17 Jun 1997 04:00:00


Jean,

You have to insure that the "EXCLUSIVE" Checkbox is unchecked when you
open the database.

Bob


> I've got a bit of a problem - I had to develop an application that
> uses
> an Access database.  The GUI opens the database with no problems and
> works perfectly until the user has the database open in Access.  Then
> things go to Heck.

> The GUI opens the database as shared (default from my research into
> this
> problem) and Access is also set to open it's databases as shared.
> Thing
> is, Access won't let anything else touch the database it has opened.
> Is
> there any way to have the database opened in both Access and VB5?  I'd

> hate to have to tell my users that they can't use both my app and
> Access
> at the same time...
> --
> /***************************************\
> |* I'm a wizard, not an English major. *|
> |*  Pleas ignorre all uv mine speling  *|
> |*     an' gramatickal error, ok!      *|
> \***************************************/

> -------------------------------------------------------------------------------------------------------------


>   Jean-Michel O'Donnell

>      Netscape Conference Address
>      Netscape Conference DLS Server
>   I'm a wizard, not an English major. Buzz off...
>   Additional Information:
>   Last Name
>   First NameJean-Michel O'Donnell

--

http://www.ici.net/cust_pages/vbmaster/index.htm
Author: Visual Basic Game Development Secrets
http://www.ici.net/cust_pages/vbmaster/gamedev/home.htm

 
 
 

Sharing a database between Access and a VB5 program

Post by Jean-Michel O'Donnel » Wed, 18 Jun 1997 04:00:00


This is a multi-part message in MIME format.
--------------FFA8CF1B2D38443D534BA000
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The Exclusive checkbox is unchecked.  Access still won't share the
database <sigh>


> Jean,

> You have to insure that the "EXCLUSIVE" Checkbox is unchecked when you
> open the database.

> Bob


> > I've got a bit of a problem - I had to develop an application that
> > uses
> > an Access database.  The GUI opens the database with no problems and
> > works perfectly until the user has the database open in Access.  Then
> > things go to Heck.

> > The GUI opens the database as shared (default from my research into
> > this
> > problem) and Access is also set to open it's databases as shared.
> > Thing
> > is, Access won't let anything else touch the database it has opened.
> > Is
> > there any way to have the database opened in both Access and VB5?  I'd

> > hate to have to tell my users that they can't use both my app and
> > Access
> > at the same time...
> > --

--
/***************************************\
|* I'm a wizard, not an English major. *|
|*  Pleas ignorre all uv mine speling  *|
|*     an' gramatickal error, ok!      *|
\***************************************/
--------------FFA8CF1B2D38443D534BA000
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Jean-Michel O'Donnell
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Jean-Michel O'Donnell
n:              ;Jean-Michel O'Donnell

note:           I'm a wizard, not an English major.  Buzz off...
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
end:            vcard

--------------FFA8CF1B2D38443D534BA000--

 
 
 

Sharing a database between Access and a VB5 program

Post by Dave Ronso » Thu, 19 Jun 1997 04:00:00


How are you accessing the database in your VB5 code?  Using the data
control?  If so, is the exclusive property set to false?

I use these statements to get shared access.

Set gDataWorkspace = DBEngine.Workspaces(0)
Set gControlCentreDatabase = DataWorkspace.OpenDatabase(gControlCentrePath,
False, False)

Where is your .mdb file?  For sharing, everyone has to be able to have
read/write in the directory or else jet cannot create the locking file
(.ldb)

        ...Dave



Quote:> The Exclusive checkbox is unchecked.  Access still won't share the
> database <sigh>