943,691 Members | Top Members by Rank

Ad:
Oct 31st, 2008
0

Shared Database with Jet possible?

Expand Post »
I have a database working with VB6 and Jet. Everything works fine except that I now need the database to be accessed from a second machine on the network.

It appears that only one person can be connected at a time to the database using Jet, is this correct?

In the 'DefaultType' of the data method it has the option for Use ODBC, which, from my research, appears to be a more recent and flexible way to access databases. Is this what I need to use to get shared connections to the database?

Is so how do I use it? If I select it and run I get a 'Data source name too long' error.

Many thanks
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Entropy1024 is offline Offline
20 posts
since Oct 2008
Oct 31st, 2008
0

Re: Shared Database with Jet possible?

More than one person can access it. Never done it with VB6 but its definately possible in .NET, just ensure that record locking is set correctly, and that the data connection is SHARE DENY NONE
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is offline Offline
16,501 posts
since Apr 2005
Oct 31st, 2008
0

Re: Shared Database with Jet possible?

There is an option for 'Exclusive' which I have set to false so I assume this is the same as your 'Share Deny None'

I can't find anything to suggest Record Locking. What does this do? Does it lock the database whilst you are making changes then release it to others after you have made an edit?

Any idea where this is in VB6?

Many thanks for the help.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Entropy1024 is offline Offline
20 posts
since Oct 2008
Oct 31st, 2008
0

Re: Shared Database with Jet possible?

nah record locking is actually set within MS access itself under DB properties

and yeah it does, theres different types, e.g lock whole database, lock whole table, lock whole row, or lock whole field, or none (bad)
Moderator
Featured Poster
Reputation Points: 1764
Solved Threads: 574
Moderator
jbennet is offline Offline
16,501 posts
since Apr 2005
Oct 31st, 2008
0

Re: Shared Database with Jet possible?

I think it may be this:

ReadOnly = False or True

If, when compiling the program, I set it to False then I can Write a new record and read etc. But I cant backup the database as it's in use. If I set this to True then I can read data using my program and backup the database but I cant create new records.

So I though I could change this at runtime using Data1.ReadOnly = False when creating a new record then setting it back to True when saved. However I can't seem to change this value at runtime.

Why on earth cant I change this value at runtime???
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Entropy1024 is offline Offline
20 posts
since Oct 2008
Nov 3rd, 2008
0

Re: Shared Database with Jet possible?

Do I have to disconnect from the database before I can change the ReadOnly from False to True?

Is that where I am going wrong? If so how?

Many thanks for any help.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Entropy1024 is offline Offline
20 posts
since Oct 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: multiple condition update
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: inserting character in a string





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC