
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
> .