Sharing Database 
Author Message
 Sharing Database

Ron,

When do you get that error? During opening of recordset? Is it Access?

--
Val Mazur
Microsoft MVP


Quote:
> I have written a series of programs that access the same
> database. One writes the records and the others read only.
> When I try to run one of the read only programs when the
> other program is running I get a message "file already in
> use".
> What do I need to do to allow the programs to run
> together?

> regards

> Ron Grout



Sun, 08 May 2005 21:12:40 GMT  
 Sharing Database
Hi Val,

yes it is an access database and the error appears to
occur when the referesh operation is performed.

regards

Ron

Quote:
>-----Original Message-----
>Ron,

>When do you get that error? During opening of recordset?
Is it Access?

>--
>Val Mazur
>Microsoft MVP



>> I have written a series of programs that access the
same
>> database. One writes the records and the others read
only.
>> When I try to run one of the read only programs when
the
>> other program is running I get a message "file already
in
>> use".
>> What do I need to do to allow the programs to run
>> together?

>> regards

>> Ron Grout

>.



Sun, 08 May 2005 21:24:03 GMT  
 Sharing Database
Ron,

Try to use Requery, see if it helps

--
Val Mazur
Microsoft MVP


Quote:
> Hi Val,

> yes it is an access database and the error appears to
> occur when the referesh operation is performed.

> regards

> Ron

> >-----Original Message-----
> >Ron,

> >When do you get that error? During opening of recordset?
> Is it Access?

> >--
> >Val Mazur
> >Microsoft MVP



> >> I have written a series of programs that access the
> same
> >> database. One writes the records and the others read
> only.
> >> When I try to run one of the read only programs when
> the
> >> other program is running I get a message "file already
> in
> >> use".
> >> What do I need to do to allow the programs to run
> >> together?

> >> regards

> >> Ron Grout

> >.



Sun, 08 May 2005 21:39:12 GMT  
 Sharing Database

Hi again Val,
I think it is going wrong when I connect to the database.
I am using the following code:

 With Adodcheaders
 .ConnectionString
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=M:\scannedimages.mdb;Persist Security Info=False;"
 .Mode = adModeShareDenyNone
 .CommandType = adCmdText
 .RecordSource = "select * from imagetable where
sd_suppno = '" & SUPPNO & " ' AND sd_suppcert =  '" &
CERTNO & " ' AND sd_BATCHNO =  '" & BATCHNO & " '"
 .Refresh
 End With

Is there anything differnet that I should do here?

regards

Ron

Quote:
>-----Original Message-----
>Ron,

>Try to use Requery, see if it helps

>--
>Val Mazur
>Microsoft MVP



>> Hi Val,

>> yes it is an access database and the error appears to
>> occur when the referesh operation is performed.

>> regards

>> Ron

>> >-----Original Message-----
>> >Ron,

>> >When do you get that error? During opening of
recordset?
>> Is it Access?

>> >--
>> >Val Mazur
>> >Microsoft MVP



>> >> I have written a series of programs that access the
>> same
>> >> database. One writes the records and the others read
>> only.
>> >> When I try to run one of the read only programs when
>> the
>> >> other program is running I get a message "file
already
>> in
>> >> use".
>> >> What do I need to do to allow the programs to run
>> >> together?

>> >> regards

>> >> Ron Grout

>> >.

>.



Sun, 08 May 2005 23:52:20 GMT  
 Sharing Database
Ron,

Could be problem with .Mode = adModeShareDenyNone. Try to comment line of
code
--
Val Mazur
Microsoft MVP


Quote:

> Hi again Val,
> I think it is going wrong when I connect to the database.
> I am using the following code:

>  With Adodcheaders
>  .ConnectionString
> = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=M:\scannedimages.mdb;Persist Security Info=False;"
>  .Mode = adModeShareDenyNone
>  .CommandType = adCmdText
>  .RecordSource = "select * from imagetable where
> sd_suppno = '" & SUPPNO & " ' AND sd_suppcert =  '" &
> CERTNO & " ' AND sd_BATCHNO =  '" & BATCHNO & " '"
>  .Refresh
>  End With

> Is there anything differnet that I should do here?

> regards

> Ron

> >-----Original Message-----
> >Ron,

> >Try to use Requery, see if it helps

> >--
> >Val Mazur
> >Microsoft MVP



> >> Hi Val,

> >> yes it is an access database and the error appears to
> >> occur when the referesh operation is performed.

> >> regards

> >> Ron

> >> >-----Original Message-----
> >> >Ron,

> >> >When do you get that error? During opening of
> recordset?
> >> Is it Access?

> >> >--
> >> >Val Mazur
> >> >Microsoft MVP



> >> >> I have written a series of programs that access the
> >> same
> >> >> database. One writes the records and the others read
> >> only.
> >> >> When I try to run one of the read only programs when
> >> the
> >> >> other program is running I get a message "file
> already
> >> in
> >> >> use".
> >> >> What do I need to do to allow the programs to run
> >> >> together?

> >> >> regards

> >> >> Ron Grout

> >> >.

> >.



Mon, 09 May 2005 00:04:43 GMT  
 Sharing Database
Hi Val,

I tried all options with modes including none but to no
avail. Is there something on the connection string line
or locktype that would do it?

regards

Ron

Quote:
>-----Original Message-----
>Ron,

>Could be problem with .Mode = adModeShareDenyNone. Try
to comment line of
>code
>--
>Val Mazur
>Microsoft MVP



>> Hi again Val,
>> I think it is going wrong when I connect to the
database.
>> I am using the following code:

>>  With Adodcheaders
>>  .ConnectionString
>> = "Provider=Microsoft.Jet.OLEDB.4.0;Data
>> Source=M:\scannedimages.mdb;Persist Security
Info=False;"
>>  .Mode = adModeShareDenyNone
>>  .CommandType = adCmdText
>>  .RecordSource = "select * from imagetable where
>> sd_suppno = '" & SUPPNO & " ' AND sd_suppcert =  '" &
>> CERTNO & " ' AND sd_BATCHNO =  '" & BATCHNO & " '"
>>  .Refresh
>>  End With

>> Is there anything differnet that I should do here?

>> regards

>> Ron

>> >-----Original Message-----
>> >Ron,

>> >Try to use Requery, see if it helps

>> >--
>> >Val Mazur
>> >Microsoft MVP



>> >> Hi Val,

>> >> yes it is an access database and the error appears
to
>> >> occur when the referesh operation is performed.

>> >> regards

>> >> Ron

>> >> >-----Original Message-----
>> >> >Ron,

>> >> >When do you get that error? During opening of
>> recordset?
>> >> Is it Access?

>> >> >--
>> >> >Val Mazur
>> >> >Microsoft MVP





- Show quoted text -

Quote:
>> >> >> I have written a series of programs that access
the
>> >> same
>> >> >> database. One writes the records and the others
read
>> >> only.
>> >> >> When I try to run one of the read only programs
when
>> >> the
>> >> >> other program is running I get a message "file
>> already
>> >> in
>> >> >> use".
>> >> >> What do I need to do to allow the programs to run
>> >> >> together?

>> >> >> regards

>> >> >> Ron Grout

>> >> >.

>> >.

>.



Mon, 09 May 2005 21:57:28 GMT  
 Sharing Database
Ron,

No, there is nothing in connection string. All locking is in LockType
proprty of recordset and in Mode property.

--
Val Mazur
Microsoft MVP


Quote:
> Hi Val,

> I tried all options with modes including none but to no
> avail. Is there something on the connection string line
> or locktype that would do it?

> regards

> Ron

> >-----Original Message-----
> >Ron,

> >Could be problem with .Mode = adModeShareDenyNone. Try
> to comment line of
> >code
> >--
> >Val Mazur
> >Microsoft MVP



> >> Hi again Val,
> >> I think it is going wrong when I connect to the
> database.
> >> I am using the following code:

> >>  With Adodcheaders
> >>  .ConnectionString
> >> = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> >> Source=M:\scannedimages.mdb;Persist Security
> Info=False;"
> >>  .Mode = adModeShareDenyNone
> >>  .CommandType = adCmdText
> >>  .RecordSource = "select * from imagetable where
> >> sd_suppno = '" & SUPPNO & " ' AND sd_suppcert =  '" &
> >> CERTNO & " ' AND sd_BATCHNO =  '" & BATCHNO & " '"
> >>  .Refresh
> >>  End With

> >> Is there anything differnet that I should do here?

> >> regards

> >> Ron

> >> >-----Original Message-----
> >> >Ron,

> >> >Try to use Requery, see if it helps

> >> >--
> >> >Val Mazur
> >> >Microsoft MVP



> >> >> Hi Val,

> >> >> yes it is an access database and the error appears
> to
> >> >> occur when the referesh operation is performed.

> >> >> regards

> >> >> Ron

> >> >> >-----Original Message-----
> >> >> >Ron,

> >> >> >When do you get that error? During opening of
> >> recordset?
> >> >> Is it Access?

> >> >> >--
> >> >> >Val Mazur
> >> >> >Microsoft MVP




> >> >> >> I have written a series of programs that access
> the
> >> >> same
> >> >> >> database. One writes the records and the others
> read
> >> >> only.
> >> >> >> When I try to run one of the read only programs
> when
> >> >> the
> >> >> >> other program is running I get a message "file
> >> already
> >> >> in
> >> >> >> use".
> >> >> >> What do I need to do to allow the programs to run
> >> >> >> together?

> >> >> >> regards

> >> >> >> Ron Grout

> >> >> >.

> >> >.

> >.



Mon, 09 May 2005 22:09:57 GMT  
 Sharing Database

I have written a series of programs that access the same
database. One writes the records and the others read only.
When I try to run one of the read only programs when the
other program is running I get a message "file already in
use".
What do I need to do to allow the programs to run
together?

Is the database located on a network share?

There are usually two possibilities. First is that another application has the database opened
exclusively. I would verify that all of your apps open the database in shared mode.

Second, if the user opening the database doesn't have sufficient permissions for the folder, the
corresponding .LDB file cannot be created and this will cause an error when opening in shared mode.
Users must have read/write/modify/delete access on the folder where the database is located. Just
make sure to deny delete priviledges on the database file.


Microsoft MVP (Visual Basic)



Tue, 10 May 2005 03:35:35 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Opening Shared database

2. shared database on NT

3. Listing the current users of a shared database

4. Kicking users off a shared database

5. How to share database without server

6. sharing database..help

7. Sharing database in network..

8. Share Database

9. Shared databases in VB4 - DANGER!

10. Q:Share database with Apple Mac?

11. DBAS IV Shared Database problem

12. VB on '95 Network - Shared Database

 

 
Powered by phpBB® Forum Software