DB on CD


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: DB on CD

  1. #1
    Alan Cartwright Guest

    DB on CD

    Hi,
    I have a number of applications which use largish (20+mb) Access 97 dbs. I
    want to give uses read only access to these with the db stored on CD. Older
    versions of access would allow this. As far as I can see newer version (97
    on) wont. Can anyone tell me if there is a way of doing this or is there
    another database which will work with VB6 into which I could copy the
    relavent data and access it using SQL?

    Thanks
    Alan Cartwright



  2. #2
    challis Guest

    Re: DB on CD


    Hi,

    Access (any version) this is not possible because Access writes a support
    file with the same name as you db with the extension of ldb into the databases
    directory. It requires this file to maintain it's locking information. (You
    can't always write to a CD). What you may want to consider is an indexed
    text file of some sort. (I do not know of a database for which this would
    work) Perhaps a ADO recordset stored on the cd would be ok, but bear in mind
    it would have to read the entire file to memory which may be prohibitive.

    But If you only reason for storing the database on cd is that you can be
    reasonably sure it is read only, keep in mind you can lock and password access
    databases. Programatically you can the supply the password and open the db,
    without the user being able to access the db except through your program.


    challis


    "Alan Cartwright" <alan@coeatext.u-net.com> wrote:
    >Hi,
    >I have a number of applications which use largish (20+mb) Access 97 dbs.

    I
    >want to give uses read only access to these with the db stored on CD. Older
    >versions of access would allow this. As far as I can see newer version (97
    >on) wont. Can anyone tell me if there is a way of doing this or is there
    >another database which will work with VB6 into which I could copy the
    >relavent data and access it using SQL?
    >
    >Thanks
    >Alan Cartwright
    >
    >



  3. #3
    Douglas J. Steele Guest

    Re: DB on CD

    Whenever you attempt to open an Access database file (.MDB), Access wants to
    create a locking file (.LDB) in the same folder. Since you can't create
    files on a CD-ROM, this can lead to problems. The only way I'm aware of to
    get around it is to explicitly open the database as Read-Only AND Exclusive.
    Under that combination, Access doesn't bother trying to create the locking
    file.

    If you're actually opening the .MDB through Access, the easiest way to
    accomplish this is through a shortcut that includes the Read-Only and
    Exclusive parms as part of the shortcut.

    If opening through code from elsewhere (say, VB), you can pass these as
    parms through the OpenDatabase statement.

    BTW, despite the fact that you're telling Access to open Exclusively,
    multiple users can access it at the same time. Trust Microsoft to redefine
    the word "Exclusive"!

    HTH

    --

    Doug Steele, Microsoft Access MVP
    Beer, Wine and Database Programming. What could be better?
    Visit "Doug Steele's Beer and Programming Emporium"
    http://I.Am/DougSteele/


    Alan Cartwright <alan@coeatext.u-net.com> wrote in message
    news:39e7d545@news.devx.com...
    > Hi,
    > I have a number of applications which use largish (20+mb) Access 97 dbs.

    I
    > want to give uses read only access to these with the db stored on CD.

    Older
    > versions of access would allow this. As far as I can see newer version (97
    > on) wont. Can anyone tell me if there is a way of doing this or is there
    > another database which will work with VB6 into which I could copy the
    > relavent data and access it using SQL?
    >
    > Thanks
    > Alan Cartwright
    >
    >




  4. #4
    Alan Cartwright Guest

    Re: DB on CD

    Thanks,
    I shall try this. The reason that I am trying to do this is that the
    database is essentially a storage for data to be used in an analysis of
    speech and I dont want to have to add the db's to users hard disks.
    Regards
    Alan Cartwright

    "Douglas J. Steele" <djsteele@idirect.com> wrote in message
    news:39eb0737@news.devx.com...
    > Whenever you attempt to open an Access database file (.MDB), Access wants

    to
    > create a locking file (.LDB) in the same folder. Since you can't create
    > files on a CD-ROM, this can lead to problems. The only way I'm aware of to
    > get around it is to explicitly open the database as Read-Only AND

    Exclusive.
    > Under that combination, Access doesn't bother trying to create the locking
    > file.
    >
    > If you're actually opening the .MDB through Access, the easiest way to
    > accomplish this is through a shortcut that includes the Read-Only and
    > Exclusive parms as part of the shortcut.
    >
    > If opening through code from elsewhere (say, VB), you can pass these as
    > parms through the OpenDatabase statement.
    >
    > BTW, despite the fact that you're telling Access to open Exclusively,
    > multiple users can access it at the same time. Trust Microsoft to redefine
    > the word "Exclusive"!
    >
    > HTH
    >
    > --
    >
    > Doug Steele, Microsoft Access MVP
    > Beer, Wine and Database Programming. What could be better?
    > Visit "Doug Steele's Beer and Programming Emporium"
    > http://I.Am/DougSteele/
    >
    >
    > Alan Cartwright <alan@coeatext.u-net.com> wrote in message
    > news:39e7d545@news.devx.com...
    > > Hi,
    > > I have a number of applications which use largish (20+mb) Access 97 dbs.

    > I
    > > want to give uses read only access to these with the db stored on CD.

    > Older
    > > versions of access would allow this. As far as I can see newer version

    (97
    > > on) wont. Can anyone tell me if there is a way of doing this or is

    there
    > > another database which will work with VB6 into which I could copy the
    > > relavent data and access it using SQL?
    > >
    > > Thanks
    > > Alan Cartwright
    > >
    > >

    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center