Desperate for help on sharing database 
Author Message
 Desperate for help on sharing database

I have a suite of programs that should share the same
database. One writes the records and the others only
read them.

The connection for the reading programs is as follows:

STRQUERY = "select * from IMAGETABLE where SD_SUPPNO
LIKE '" & SUPPLIER_NO & "'"
 With Adodcheaders
    .ConnectionString
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\scannedimages.mdb;Persist Security Info=False;"
    .CommandType = adCmdText
    .RecordSource = STRQUERY
    .Refresh
End With

The connection for the writing program is

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

When I run the read program when the write program is
running I get a message that the file is already in use.
Any ideas as to how I could overcome this?

regards

Ron Grout

.



Tue, 10 May 2005 15:56:46 GMT  
 Desperate for help on sharing database
Why don't you try to connect to your database using the ODBC-manager in the
control panel, and build your connection this way. You just have to call the
DSN in your connection-string. You can even specify whether you want to open
the recordset as write or read only.
I think this could solve your problem!

I always do it this way and I never had the problems that you describe.

Regards,

Raf


Quote:
> I have a suite of programs that should share the same
> database. One writes the records and the others only
> read them.

> The connection for the reading programs is as follows:

> STRQUERY = "select * from IMAGETABLE where SD_SUPPNO
> LIKE '" & SUPPLIER_NO & "'"
>  With Adodcheaders
>     .ConnectionString
> = "Provider=Microsoft.Jet.OLEDB.4.0;Data
> Source=C:\scannedimages.mdb;Persist Security Info=False;"
>     .CommandType = adCmdText
>     .RecordSource = STRQUERY
>     .Refresh
> End With

> The connection for the writing program is

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

> When I run the read program when the write program is
> running I get a message that the file is already in use.
> Any ideas as to how I could overcome this?

> regards

> Ron Grout

> .



Wed, 11 May 2005 04:22:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Securing my Database - Desperate Need for Help

2. DESPERATE:How to detect shared folders?

3. sharing database..help

4. Need desperate help!!

5. Desperate problem; please help

6. Please Help!!!(Im desperate)

7. Please Help!!!(Im desperate)

8. Desperate for Help-VB err w/ 2002 upgrade

9. Desperate VBScript ADO help

10. Desperate for help

11. OWA message filtering help needed, getting desperate....

12. Help! I'm desperate :)

 

 
Powered by phpBB® Forum Software